From d1004f6be161cb45929397ad21ff9f68c3b9e809 Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Sun, 4 Oct 2020 13:14:39 +0800 Subject: [PATCH] back to java 7 --- pom.xml | 4 +-- .../test/runtime/javascript/BaseNodeTest.java | 30 ++++++++++++------- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 7cf5813de..5286a1a8c 100644 --- a/pom.xml +++ b/pom.xml @@ -96,8 +96,8 @@ UTF-8 UTF-8 true - 1.8 - 1.8 + 1.7 + 1.7 diff --git a/runtime-testsuite/test/org/antlr/v4/test/runtime/javascript/BaseNodeTest.java b/runtime-testsuite/test/org/antlr/v4/test/runtime/javascript/BaseNodeTest.java index e24815d7b..d900e5d7f 100644 --- a/runtime-testsuite/test/org/antlr/v4/test/runtime/javascript/BaseNodeTest.java +++ b/runtime-testsuite/test/org/antlr/v4/test/runtime/javascript/BaseNodeTest.java @@ -289,8 +289,10 @@ public class BaseNodeTest implements RuntimeTestSupport { process.getErrorStream()); stdoutVacuum.start(); stderrVacuum.start(); - if(!process.waitFor(1L, TimeUnit.MINUTES)) - process.destroyForcibly(); + // TODO switch to jdk 8 + process.waitFor(); + // if(!process.waitFor(1L, TimeUnit.MINUTES)) + // process.destroyForcibly(); stdoutVacuum.join(); stderrVacuum.join(); String output = stdoutVacuum.toString(); @@ -320,8 +322,10 @@ public class BaseNodeTest implements RuntimeTestSupport { builder.redirectError(new File(tmpdir, "error.txt")); builder.redirectOutput(new File(tmpdir, "output.txt")); Process process = builder.start(); - if(!process.waitFor(30L, TimeUnit.SECONDS)) - process.destroyForcibly(); + // TODO switch to jdk 8 + process.waitFor(); + // if(!process.waitFor(30L, TimeUnit.SECONDS)) + // process.destroyForcibly(); int error = process.exitValue(); if(error!=0) throw new IOException("'npm install' failed"); @@ -334,8 +338,10 @@ public class BaseNodeTest implements RuntimeTestSupport { builder.redirectError(new File(tmpdir, "error.txt")); builder.redirectOutput(new File(tmpdir, "output.txt")); Process process = builder.start(); - if(!process.waitFor(30L, TimeUnit.SECONDS)) - process.destroyForcibly(); + // TODO switch to jdk 8 + process.waitFor(); + // if(!process.waitFor(30L, TimeUnit.SECONDS)) + // process.destroyForcibly(); int error = process.exitValue(); if(error!=0) throw new IOException("'npm link' failed"); @@ -347,8 +353,10 @@ public class BaseNodeTest implements RuntimeTestSupport { builder.redirectError(new File(tmpdir, "error.txt")); builder.redirectOutput(new File(tmpdir, "output.txt")); Process process = builder.start(); - if(!process.waitFor(30L, TimeUnit.SECONDS)) - process.destroyForcibly(); + // TODO switch to jdk 8 + process.waitFor(); + // if(!process.waitFor(30L, TimeUnit.SECONDS)) + // process.destroyForcibly(); int error = process.exitValue(); if(error!=0) throw new IOException("'npm link antlr4' failed"); @@ -371,8 +379,10 @@ public class BaseNodeTest implements RuntimeTestSupport { Process process = builder.start(); StreamVacuum vacuum = new StreamVacuum(process.getInputStream()); vacuum.start(); - if(!process.waitFor(30L, TimeUnit.SECONDS)) - process.destroyForcibly(); + // TODO switch to jdk 8 + process.waitFor(); + // if(!process.waitFor(30L, TimeUnit.SECONDS)) + // process.destroyForcibly(); vacuum.join(); return process.exitValue() == 0; } catch (Exception e) {