troubleshoot travis javascript build

This commit is contained in:
Eric Vergnaud 2020-10-04 10:33:20 +08:00
parent c35b258c59
commit 36663e0b64
2 changed files with 7 additions and 6 deletions

View File

@ -96,8 +96,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<antlr.testinprocess>true</antlr.testinprocess>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<mailingLists>

View File

@ -56,6 +56,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.TimeUnit;
import static org.antlr.v4.test.runtime.BaseRuntimeTest.antlrOnString;
import static org.antlr.v4.test.runtime.BaseRuntimeTest.writeFile;
@ -346,7 +347,7 @@ public class BaseNodeTest implements RuntimeTestSupport {
process.getErrorStream());
stdoutVacuum.start();
stderrVacuum.start();
process.waitFor();
process.waitFor(1L, TimeUnit.MINUTES);
stdoutVacuum.join();
stderrVacuum.join();
String output = stdoutVacuum.toString();
@ -372,7 +373,7 @@ public class BaseNodeTest implements RuntimeTestSupport {
builder.redirectError(new File(tmpdir, "error.txt"));
builder.redirectOutput(new File(tmpdir, "output.txt"));
Process process = builder.start();
process.waitFor();
process.waitFor(3L, TimeUnit.SECONDS);
int error = process.exitValue();
if(error!=0)
throw new IOException("'npm link' failed");
@ -384,7 +385,7 @@ public class BaseNodeTest implements RuntimeTestSupport {
builder.redirectError(new File(tmpdir, "error.txt"));
builder.redirectOutput(new File(tmpdir, "output.txt"));
Process process = builder.start();
process.waitFor();
process.waitFor(3L, TimeUnit.SECONDS);
int error = process.exitValue();
if(error!=0)
throw new IOException("'npm link antlr4' failed");
@ -407,7 +408,7 @@ public class BaseNodeTest implements RuntimeTestSupport {
Process process = builder.start();
StreamVacuum vacuum = new StreamVacuum(process.getInputStream());
vacuum.start();
process.waitFor();
process.waitFor(3L, TimeUnit.SECONDS);
vacuum.join();
return process.exitValue() == 0;
} catch (Exception e) {