diff options
Diffstat (limited to 'clustercontroller-utils/src')
2 files changed, 0 insertions, 30 deletions
diff --git a/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/util/Clock.java b/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/util/Clock.java deleted file mode 100644 index b555c84bcb8..00000000000 --- a/clustercontroller-utils/src/main/java/com/yahoo/vespa/clustercontroller/utils/util/Clock.java +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.clustercontroller.utils.util; - -/** - * Wrap access to clock so that we can override it in unit tests - */ -public class Clock { - - public long getTimeInMillis() { return System.currentTimeMillis(); } - - public int getTimeInSecs() { return (int)(getTimeInMillis() / 1000); } - -} diff --git a/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/util/ClockTest.java b/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/util/ClockTest.java deleted file mode 100644 index c791723615c..00000000000 --- a/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/util/ClockTest.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.clustercontroller.utils.util; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class ClockTest { - - @Test - void testNothingButGetCoverage() { - long s = new Clock().getTimeInSecs(); - long ms = new Clock().getTimeInMillis(); - assertTrue(ms >= 1000 * s); - } - -} |