aboutsummaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java/com
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-01-11 12:18:14 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2024-01-11 12:18:14 +0100
commitb092bf28788c76b6ca1cf8285592d08cc832e8e4 (patch)
tree4311e3a81e96a2f1cb8ed6851dc8e875b2e10941 /vespajlib/src/test/java/com
parentd5ca7f1fcf2a762b03205aa57edfc79e2dedb302 (diff)
Avoid deprecated methods
Diffstat (limited to 'vespajlib/src/test/java/com')
-rw-r--r--vespajlib/src/test/java/com/yahoo/system/execution/ProcessExecutorTest.java3
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());