Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationSetup.java')
-rw-r--r--org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationSetup.java29
1 files changed, 20 insertions, 9 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationSetup.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationSetup.java
index 1be53244ba..8153472966 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationSetup.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/EvaluationSetup.java
@@ -13,6 +13,8 @@
*******************************************************************************/
package org.eclipse.jdt.core.tests.eval;
+import static org.junit.Assert.assertTrue;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -56,31 +58,39 @@ public class EvaluationSetup extends CompilerTestSetup {
launcher.setEvalTargetPath(EVAL_DIRECTORY);
this.launchedVM = launcher.launch();
} catch (TargetException e) {
- throw new Error(e.getMessage());
+ e.printStackTrace();
+ throw new Error(e.getMessage(), e);
}
-
+
// Thread that read the stout of the VM so that the VM doesn't block
try {
startReader("VM's stdout reader", this.launchedVM.getInputStream(), System.out);
} catch (TargetException e) {
+ e.printStackTrace();
}
-
+
// Thread that read the sterr of the VM so that the VM doesn't block
try {
startReader("VM's sterr reader", this.launchedVM.getErrorStream(), System.err);
} catch (TargetException e) {
+ e.printStackTrace();
}
-
+
// Create context
this.context = new EvaluationContext();
-
+
// Create target
this.target = new TargetInterface();
- this.target.connect(server, 30000); // allow 30s max to connect (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=188127)
-
+ // allow 30s max to connect (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=188127)
+ // Increased to 60 s for https://bugs.eclipse.org/bugs/show_bug.cgi?id=547417
+ this.target.connect(server, 60000);
+
+ assertTrue("Failed to connect VM server", this.target.isConnected());
+
// Create name environment
this.env = new FileSystem(Util.getJavaClassLibs(), new String[0], null);
} catch (IOException e1) {
+ e1.printStackTrace();
throw new Error("Failed to open socket", e1);
}
}
@@ -105,7 +115,7 @@ public class EvaluationSetup extends CompilerTestSetup {
}).start();
}
- protected void tearDown() {
+ final protected void tearDown() {
if (this.context != null) {
LocalVirtualMachine vm = this.launchedVM;
if (vm != null) {
@@ -125,7 +135,8 @@ public class EvaluationSetup extends CompilerTestSetup {
}
this.context = null;
} catch (TargetException e) {
- throw new Error(e.getMessage());
+ e.printStackTrace();
+ throw new Error(e.getMessage(), e);
}
}
}

Back to the top