From 54f2d8770f85443db323ede0f8f9720393c6bb6d Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Sat, 15 Apr 2017 01:58:19 +0100 Subject: [PATCH] Bug 515307: Run test order of magnitude faster The test was much too conservative on how long it waited for an event to arrive. On my machine the time was 10 ms, so I set a baseline time to wait of 100 ms allowing time for additional event to arrive. Change-Id: Ic435d360e8781936682c19b838aeec13fa3d60bd --- .../eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java index 79eaf963bd6..ff033bc75f6 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIRegistersTest.java @@ -442,8 +442,13 @@ public class MIRegistersTest extends BaseParametrizedTestCase { new ServiceEventWaitor(fSession, IRegistersChangedDMEvent.class); writeRegister(registerDmc, regValue, formatId); - - return eventWaitor.waitForEvents(TestsPlugin.massageTimeout(3000)); + + /* + * Wait long enough to find out if too few or too many events arrive. On + * my testing the expected events arrived within 10 ms, so this timeout + * allows 10x that amount of time for unexpected extra events to arrive. + */ + return eventWaitor.waitForEvents(TestsPlugin.massageTimeout(100)); }