Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343745 - JUnit tests can be delayed 2 seconds unnecessarily
Summary: JUnit tests can be delayed 2 seconds unnecessarily
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-25 12:01 EDT by Marc Khouzam CLA
Modified: 2011-05-13 11:08 EDT (History)
2 users (show)

See Also:
marc.khouzam: review? (john.cortell)


Attachments
Fix (1.59 KB, patch)
2011-04-25 12:01 EDT, Marc Khouzam CLA
cdtdoug: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Khouzam CLA 2011-04-25 12:01:10 EDT
Created attachment 193997 [details]
Fix

I noticed that there is a race condition when receiving the suspended event when we start a JUnit tests.  In some tests, we perform some steps such as turning on reverse debugging, after the target is suspended.

In those cases, we would wait 2 seconds for the suspended event to arrive, although that event has already been received.

This patch simply checks if we have already received the event and avoid waiting for it in that case.
Comment 1 Marc Khouzam CLA 2011-04-25 12:03:08 EDT
Committed to HEAD.

John, can you review?
Comment 2 CDT Genie CLA 2011-04-25 12:23:12 EDT
*** cdt cvs genie on behalf of mkhouzam ***
Bug 343745: JUnit tests can be delayed 2 seconds unnecessarily

[*] BaseTestCase.java 1.16 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/framework/BaseTestCase.java?root=Tools_Project&r1=1.15&r2=1.16