Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-07-25 21:22:37 +0000
committereutarass2011-07-25 21:22:37 +0000
commit06c23d8730c93f23100c56bbbb779b9c51912305 (patch)
tree7b70eeb93780574f3370fd27cf40b7a92f96385a /plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf
parent8806cbf4fe9189178f44f116e582dee6fbe07db6 (diff)
downloadorg.eclipse.tcf-06c23d8730c93f23100c56bbbb779b9c51912305.tar.gz
org.eclipse.tcf-06c23d8730c93f23100c56bbbb779b9c51912305.tar.xz
org.eclipse.tcf-06c23d8730c93f23100c56bbbb779b9c51912305.zip
TCF Tests: fixed synchronization gap in tests run control.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/RunControl.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/RunControl.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/RunControl.java
index edc0c46b7..209767ae7 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/RunControl.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/RunControl.java
@@ -132,19 +132,31 @@ class RunControl {
}
else {
if (suspended) suspended_ctx_ids.add(id);
+ getStateDone();
}
}
}));
}
+ getStateDone();
}
}
}));
}
+ getStateDone();
}
}
}));
}
+ private void getStateDone() {
+ if (get_state_cmds.size() > 0) return;
+ if (channel.getState() != IChannel.STATE_OPEN) return;
+ if (suspended_ctx_ids.size() > 0) {
+ String[] arr = suspended_ctx_ids.toArray(new String[suspended_ctx_ids.size()]);
+ resume(arr[rnd.nextInt(arr.length)], IRunControl.RM_RESUME);
+ }
+ }
+
private void startTimer() {
Protocol.invokeLater(50, new Runnable() {
public void run() {
@@ -174,6 +186,7 @@ class RunControl {
boolean canResume(String id) {
if (sync_pending) return false;
+ if (get_state_cmds.size() > 0) return false;
if (resume_cmds.get(id) != null) return false;
if (test_suite.getCanceledTests().get(id) == null && !suspended_ctx_ids.contains(id)) return false;
IRunControl.RunControlContext ctx = ctx_map.get(id);
@@ -190,7 +203,7 @@ class RunControl {
}
void resume(final String id, final int mode) {
- if (!canResume(id)) return;
+ if (!test_suite.canResume(id)) return;
assert !sync_pending;
sync_pending = true;
Protocol.sync(new Runnable() {

Back to the top