JAVA-2824 Fix tests in Java 9 and above modules (Update after PR review)

This commit is contained in:
mikr
2020-10-29 22:01:15 +01:00
parent 39af870a1a
commit 6f6c86d9a7
5 changed files with 36 additions and 33 deletions

View File

@@ -9,7 +9,7 @@ import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.time.StopWatch;
import org.junit.Test;
public class ElapsedTimeUnitTest {
public class ElapsedTimeManualTest {
@Test
public void givenRunningTask_whenMeasuringTimeWithCurrentTimeMillis_thenGetElapsedTime() throws InterruptedException {
@@ -55,7 +55,7 @@ public class ElapsedTimeUnitTest {
The below test depends on the elapsed time, which isn't ideal in a test.
Also, it slows down test execution artificially.
*/
/*@Test
@Test
public void givenRunningTask_whenMeasuringTimeWithInstantClass_thenGetElapsedTime() throws InterruptedException {
Instant start = Instant.now();
System.out.println("start: " + start);
@@ -70,7 +70,7 @@ public class ElapsedTimeUnitTest {
System.out.println("elapsed: " + timeElapsed);
assertEquals(true, (2000L <= timeElapsed) && (timeElapsed <= 3000L));
}*/
}
/**
* Simulate task running for 2.5 seconds.