1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Bug 444196 - Add delay before deleting breakpoint

We are getting intermittend failures on the GDBConsoleBreakpointsTest
due to the fact that we create and then try to delete a breakpoint so
fast that the MIBreakpointsManager does not have enough time to update
its data structures.

This is something specific to automated tests, as a user won't be able
to delete a breakpoint so fast.

Change-Id: I4b220cc859b7ee45e1b8dbde0edbcaa38b9dfe34
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/33432
Tested-by: Hudson CI
Reviewed-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
This commit is contained in:
Marc Khouzam 2014-09-16 06:53:15 -04:00
parent cee8719e10
commit 735bde8157

View file

@ -322,6 +322,14 @@ public class GDBConsoleBreakpointsTest extends BaseTestCase {
Assert.assertTrue(miBpts.length == 1);
waitForBreakpointEvent(IBreakpointsAddedEvent.class);
Assert.assertTrue(getPlatformBreakpointCount() == 1);
// Give a little delay to allow queued Executor operations
// to complete before deleting the breakpoint again.
// If we don't we may delete it so fast that the MIBreakpointsManager
// has not yet updated its data structures
// Bug 438934 comment 10
Thread.sleep(500);
plBpt = findPlatformBreakpoint(type, attributes);
Assert.assertTrue(plBpt instanceof CBreakpoint);
if (!miBpts[0].isPending()) {