From 625eb017062850e7827dddd8f3ce121e7fea1139 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Wed, 7 Oct 2026 12:09:59 -0700 Subject: Fix CI timeout --- .../src/test/java/com/seaofnodes/simple/Chapter25Test.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/chapter25/src/test/java/com/seaofnodes/simple/Chapter25Test.java b/chapter25/src/test/java/com/seaofnodes/simple/Chapter25Test.java index b06f90d8..32861bc9 100644 --- a/chapter25/src/test/java/com/seaofnodes/simple/Chapter25Test.java +++ b/chapter25/src/test/java/com/seaofnodes/simple/Chapter25Test.java @@ -18,7 +18,6 @@ import java.io.PrintStream; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; -import java.util.concurrent.TimeUnit; import org.junit.Ignore; import org.junit.Test; @@ -373,23 +372,14 @@ public class Chapter25Test { String obj = "build/objs/"+base+".o"; String exe = "build/objs/"+base+(TestC.OS.startsWith("Windows") ? ".exe" : ""); - String syms = run(new String[]{"nm",obj}); + String syms = TestC.exec("nm",obj); assertTrue(syms, syms.contains(" U sys.io.p_noInline")); TestC.linkExe(obj,null,null,new Ary<>(new String[]{SYS_FILE.toString()}),exe); - String rez = run(new String[]{exe}); + String rez = TestC.exec(exe); assertEquals(expected,rez); } - private static String run(String[] cmd) throws Exception { - Process p = new ProcessBuilder(cmd).redirectErrorStream(true).start(); - boolean normal = p.waitFor(5, TimeUnit.SECONDS); - String out = new String(p.getInputStream().readAllBytes()); - assertTrue(out, normal); - assertEquals(out,0,p.exitValue()); - return out; - } - @Test public void testRedirectedRead() throws IOException { String src = """ -- cgit v1.2.3