diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-01-11 12:18:14 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-01-11 12:18:14 +0100 |
commit | b092bf28788c76b6ca1cf8285592d08cc832e8e4 (patch) | |
tree | 4311e3a81e96a2f1cb8ed6851dc8e875b2e10941 /vespajlib/src/test | |
parent | d5ca7f1fcf2a762b03205aa57edfc79e2dedb302 (diff) |
Avoid deprecated methods
Diffstat (limited to 'vespajlib/src/test')
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/system/execution/ProcessExecutorTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/system/execution/ProcessExecutorTest.java b/vespajlib/src/test/java/com/yahoo/system/execution/ProcessExecutorTest.java index 88ad9c18134..607a223b00b 100644 --- a/vespajlib/src/test/java/com/yahoo/system/execution/ProcessExecutorTest.java +++ b/vespajlib/src/test/java/com/yahoo/system/execution/ProcessExecutorTest.java @@ -3,6 +3,7 @@ package com.yahoo.system.execution; import org.junit.Test; +import java.time.Duration; import java.util.Optional; import static org.junit.Assert.assertEquals; @@ -16,7 +17,7 @@ public class ProcessExecutorTest { @Test public void echo_can_be_executed() throws Exception { final String message = "Hello from executor!"; - ProcessExecutor executor = new ProcessExecutor.Builder(10).build(); + ProcessExecutor executor = new ProcessExecutor.Builder(Duration.ofSeconds(10)).build(); Optional<ProcessResult> result = executor.execute("echo " + message); assertTrue(result.isPresent()); assertEquals(message, result.get().stdOut.trim()); |