Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspingel2010-07-09 20:11:29 +0000
committerspingel2010-07-09 20:11:29 +0000
commit1a325a563de745ba48ba9e9cbcd3b235e3092bda (patch)
treea96b4649ab2980154876575112e170f58c7168b6 /org.eclipse.mylyn.commons.tests
parentaf8b76c7494fa91cf22c2f04fb9772aab90d4a7a (diff)
downloadorg.eclipse.mylyn.commons-1a325a563de745ba48ba9e9cbcd3b235e3092bda.tar.gz
org.eclipse.mylyn.commons-1a325a563de745ba48ba9e9cbcd3b235e3092bda.tar.xz
org.eclipse.mylyn.commons-1a325a563de745ba48ba9e9cbcd3b235e3092bda.zip
NEW - bug 318271: fix failing tests for 3.5
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318271
Diffstat (limited to 'org.eclipse.mylyn.commons.tests')
-rw-r--r--org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/net/TimeoutInputStreamTest.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/net/TimeoutInputStreamTest.java b/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/net/TimeoutInputStreamTest.java
index 69bfca02..67ec042f 100644
--- a/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/net/TimeoutInputStreamTest.java
+++ b/org.eclipse.mylyn.commons.tests/src/org/eclipse/mylyn/commons/tests/net/TimeoutInputStreamTest.java
@@ -88,6 +88,13 @@ public class TimeoutInputStreamTest extends TestCase {
} finally {
in.close();
}
+
+ // wait 30 seconds for executor to complete
+ long startTime = System.currentTimeMillis();
+ while (System.currentTimeMillis() - startTime < 30 * 1000
+ && ((ThreadPoolExecutor) CommonsNetPlugin.getExecutorService()).getActiveCount() > 0) {
+ Thread.sleep(500);
+ }
assertEquals(0, ((ThreadPoolExecutor) CommonsNetPlugin.getExecutorService()).getActiveCount());
}

Back to the top