mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 515307: Run test order of magnitude faster
The break inserter test was running all display events for 200ms after each simulated keystroke, but all sideeffects were happening synchronously or being placed on the event queue synchronously. So speed-up is achieved by running event queue until empty instead of effectively sleeping for 200ms Change-Id: Icffd4d5526176e596cf8ce3ac716a4ae88d51159 Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
This commit is contained in:
parent
1670530ffb
commit
593dc77b6d
1 changed files with 3 additions and 7 deletions
|
@ -490,12 +490,8 @@ public class BracketInserterTest extends TestCase {
|
|||
event.stateMask= stateMask;
|
||||
fAccessor.invoke("handleKeyDown", new Object[] {event});
|
||||
|
||||
new DisplayHelper() {
|
||||
@Override
|
||||
protected boolean condition() {
|
||||
return false;
|
||||
}
|
||||
}.waitForCondition(EditorTestHelper.getActiveDisplay(), 200);
|
||||
// run event loop once until all events are handled
|
||||
DisplayHelper.runEventLoop(EditorTestHelper.getActiveDisplay(), 0);
|
||||
}
|
||||
|
||||
private int getCaret() {
|
||||
|
|
Loading…
Add table
Reference in a new issue