diff options
Diffstat (limited to 'controller-server/src/test/java/com/yahoo/vespa/hosted/controller/concurrent/OnceTest.java')
-rw-r--r-- | controller-server/src/test/java/com/yahoo/vespa/hosted/controller/concurrent/OnceTest.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/concurrent/OnceTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/concurrent/OnceTest.java index e9426e96a80..c1a8f77f2e9 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/concurrent/OnceTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/concurrent/OnceTest.java @@ -1,21 +1,23 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.concurrent; -import org.junit.Test; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import java.time.Duration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author mpolden */ public class OnceTest { - @Test(timeout = 60_000) - public void test_run() throws Exception { + @Test + @Timeout(60_000) + void test_run() throws Exception { CountDownLatch latch = new CountDownLatch(1); Once.after(Duration.ZERO, latch::countDown); |