Skip to content
This repository was archived by the owner on Apr 18, 2023. It is now read-only.

Commit 8d85a45

Browse files
author
Simon Nagl
committed
Fix AlignToTimeIntervalServiceTest
1 parent e57edab commit 8d85a45

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/org/firehol/netdata/utils/UnitConversion.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
public abstract class UnitConversion {
2222
public static int NANO_PER_PLAIN = 1000000000;
23-
23+
24+
public static int MILI_PER_PLAIN = 1000;
25+
2426
public static int MILI_PER_NANO = 1000000;
2527
}

src/test/java/org/firehol/netdata/utils/AlignToTimeIntervalServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void testAlignToNextInterval() throws InterruptedException {
4848
AlignToTimeIntervalService service = new AlignToTimeIntervalService(UnitConversion.NANO_PER_PLAIN / 100);
4949

5050
// Wait longer than interval.
51-
Thread.sleep(2 * UnitConversion.NANO_PER_PLAIN / 100 / UnitConversion.MILI_PER_NANO);
51+
Thread.sleep(UnitConversion.MILI_PER_PLAIN);
5252

5353
service.alignToNextInterval();
5454

0 commit comments

Comments
 (0)