diff --git a/cosid-core/src/test/java/me/ahoo/cosid/util/CacheClockTest.java b/cosid-core/src/test/java/me/ahoo/cosid/util/CacheClockTest.java index f5dd851a7c..2cf2d0415a 100644 --- a/cosid-core/src/test/java/me/ahoo/cosid/util/CacheClockTest.java +++ b/cosid-core/src/test/java/me/ahoo/cosid/util/CacheClockTest.java @@ -54,10 +54,10 @@ void secondTimeIfBackwards() { Clock cacheClock = new Clock.CacheClock(backwardsClock); long lastTime = cacheClock.secondTime(); for (int i = 0; i < 6; i++) { + LockSupport.parkNanos(this, ONE_SECOND_PERIOD); long currentTime = cacheClock.secondTime(); assertTrue(currentTime >= lastTime); lastTime = currentTime; - LockSupport.parkNanos(this, ONE_SECOND_PERIOD); } }