Community
Participate
Working Groups
Created attachment 187002 [details] Fix I ran into a deadlock when starting the JUnit tests after the Pin&Clone feature was committed. From what I can see, the JUnit tests run in their own thread and cause the debug plugins to be loaded from that thread. At the same time, the JUnit tests launch a debug session which requires the UI thread. The problem is that the ViewIDCounterManager#init() class has started a UI job which requires the debug plugin to be loaded (to access the PinCloneUtils class). This creates a deadlock. I'm not sure if the JUnit tests are supposed to start a launch on a different thread than the UI thread, but since it is only affecting the tests, I'm just going to fix it so that it works. The fix that works is to remove the need for the UI thread from the JUnit test launch by by-passing the preLaunchCheck from the platform. That check should have been by-passed anyway as it serves no purpose for tests. The attached patch does this
Committed the patch to HEAD. Patrick, can you review?
*** cdt cvs genie on behalf of mkhouzam *** Bug 334650: [tests] JUnit test can cause deadlock [*] TestLaunchDelegate.java 1.4 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/launching/TestLaunchDelegate.java?root=Tools_Project&r1=1.3&r2=1.4
Marc, with 334651 fixed. I don't think this is required.
(In reply to comment #3) > Marc, with 334651 fixed. I don't think this is required. You are right. However, I think the fix makes the JUnit test a little leaner and quicker, so I'd prefer to keep it in in an attempt to have the JUnit test run faster.