aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacek Pospychala2012-07-31 06:43:18 (EDT)
committerJacek Pospychala2012-07-31 06:43:18 (EDT)
commitf46bbedea6d4e3e7f4c1fa50cd5c807aba2d4a9d (patch)
tree64e74b97cf4f04d0cbbc91cc8bef6a1464595905
parent4aafcd1ed87e06ffdb0c42bbfba7e33a112a31fa (diff)
downloadorg.eclipse.pdt-f46bbedea6d4e3e7f4c1fa50cd5c807aba2d4a9d.zip
org.eclipse.pdt-f46bbedea6d4e3e7f4c1fa50cd5c807aba2d4a9d.tar.gz
org.eclipse.pdt-f46bbedea6d4e3e7f4c1fa50cd5c807aba2d4a9d.tar.bz2
Bug 386305 - Test debugger dialog is not closed even if debugger was
detected correctly
-rw-r--r--plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/launching/zend/DefaultDebugServerConnectionTest.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/launching/zend/DefaultDebugServerConnectionTest.java b/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/launching/zend/DefaultDebugServerConnectionTest.java
index 211de7f..b4a7358 100644
--- a/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/launching/zend/DefaultDebugServerConnectionTest.java
+++ b/plugins/org.eclipse.php.server.ui/src/org/eclipse/php/internal/server/ui/launching/zend/DefaultDebugServerConnectionTest.java
@@ -106,8 +106,7 @@ public class DefaultDebugServerConnectionTest implements
if (isFinished) {
break;
} else {
- Thread.sleep(DEFAULT_TIMEOUT);
- if (isFinished) {
+ if (!isTimeouted()) {
break;
}
timeoutServerList.add(clientHost);
@@ -147,6 +146,16 @@ public class DefaultDebugServerConnectionTest implements
}
}
+ private boolean isTimeouted() throws InterruptedException {
+ for (int i = 0; i < 10; i++) {
+ Thread.sleep(DEFAULT_TIMEOUT / 10);
+ if (isFinished) {
+ return false;
+ }
+ }
+ return true;
+ }
+
private void activateTestDebug(IProgressMonitor monitor,
String clientHost, String debugQuery) throws IOException {
monitor