diff options
4 files changed, 6 insertions, 5 deletions
diff --git a/org.eclipse.debug.tests/META-INF/MANIFEST.MF b/org.eclipse.debug.tests/META-INF/MANIFEST.MF index 2f725b167..3696af528 100644 --- a/org.eclipse.debug.tests/META-INF/MANIFEST.MF +++ b/org.eclipse.debug.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.debug.tests;singleton:=true -Bundle-Version: 3.11.800.qualifier +Bundle-Version: 3.11.900.qualifier Bundle-Activator: org.eclipse.debug.tests.TestsPlugin Bundle-Localization: plugin Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)", diff --git a/org.eclipse.debug.tests/pom.xml b/org.eclipse.debug.tests/pom.xml index 730367299..3051467ba 100644 --- a/org.eclipse.debug.tests/pom.xml +++ b/org.eclipse.debug.tests/pom.xml @@ -18,7 +18,7 @@ </parent> <groupId>org.eclipse.debug</groupId> <artifactId>org.eclipse.debug.tests</artifactId> - <version>3.11.800-SNAPSHOT</version> + <version>3.11.900-SNAPSHOT</version> <packaging>eclipse-test-plugin</packaging> <properties> <code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings> diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/MockProcess.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/MockProcess.java index 135b54c7c..0c5667235 100644 --- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/MockProcess.java +++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/MockProcess.java @@ -232,7 +232,7 @@ public class MockProcess extends Process { * @return <code>true</code> if process is terminated */ private boolean isTerminated() { - return endTime != RUN_FOREVER && System.currentTimeMillis() > endTime; + return endTime != RUN_FOREVER && System.currentTimeMillis() >= endTime; } /** diff --git a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java index e6eb8b195..a1c6beb2c 100644 --- a/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java +++ b/org.eclipse.debug.tests/src/org/eclipse/debug/tests/console/ProcessConsoleTests.java @@ -309,7 +309,7 @@ public class ProcessConsoleTests extends AbstractDebugTest { @Test public void testAppendOutputToFile() throws Exception { final String testContent = "Hello World!"; - final File outFile = createTmpFile("test.out"); + final File outFile = createTmpFile("test-append.out"); Map<String, Object> launchConfigAttributes = new HashMap<>(); launchConfigAttributes.put(IDebugUIConstants.ATTR_CAPTURE_IN_FILE, outFile.getCanonicalPath()); launchConfigAttributes.put(IDebugUIConstants.ATTR_APPEND_TO_FILE, true); @@ -367,7 +367,7 @@ public class ProcessConsoleTests extends AbstractDebugTest { * @return the console object after it has finished */ private IOConsole doConsoleOutputTest(byte[] testContent, Map<String, Object> launchConfigAttributes) throws Exception { - final MockProcess mockProcess = new MockProcess(new ByteArrayInputStream(testContent), null, 0); + final MockProcess mockProcess = new MockProcess(new ByteArrayInputStream(testContent), null, MockProcess.RUN_FOREVER); final IProcess process = mockProcess.toRuntimeProcess("Output Redirect", launchConfigAttributes); final String encoding = launchConfigAttributes != null ? (String) launchConfigAttributes.get(DebugPlugin.ATTR_CONSOLE_ENCODING) : null; final AtomicBoolean consoleFinished = new AtomicBoolean(false); @@ -381,6 +381,7 @@ public class ProcessConsoleTests extends AbstractDebugTest { final IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager(); try { consoleManager.addConsoles(new IConsole[] { console }); + mockProcess.destroy(); waitWhile(c -> !consoleFinished.get(), testTimeout, c -> "Console did not finished."); Object value = launchConfigAttributes != null ? launchConfigAttributes.get(IDebugUIConstants.ATTR_CAPTURE_IN_FILE) : null; |