Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335098

Summary: [tests] JUnit tests don't always use the DSF executor when they should
Product: [Tools] CDT Reporter: Marc Khouzam <marc.khouzam>
Component: cdt-debug-dsf-gdbAssignee: Marc Khouzam <marc.khouzam>
Status: RESOLVED FIXED QA Contact: Marc Khouzam <marc.khouzam>
Severity: normal    
Priority: P3 CC: cdtdoug, john.cortell, pawel.1.piech
Version: 8.0Flags: marc.khouzam: review? (john.cortell)
Target Milestone: 8.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Fix marc.khouzam: iplog-

Description Marc Khouzam CLA 2011-01-22 21:27:00 EST
Running with assertions enabled (-ea) causes the JUnit tests to fail massively due to many calls that are not being made on the DSF executor although they should.

This patch fixes the problem and allows to run the tests with -ea.
Comment 1 Marc Khouzam CLA 2011-01-22 21:27:29 EST
Created attachment 187372 [details]
Fix
Comment 2 Marc Khouzam CLA 2011-01-22 21:29:47 EST
Committed to HEAD.

John, can you skim over the pattern of the solution to see it is ok?
Comment 3 Marc Khouzam CLA 2011-01-22 21:30:24 EST
Oh, and John, if you can run the JUnits on Windows with -ea, that would be really helpful.
Comment 4 CDT Genie CLA 2011-01-22 22:23:01 EST
*** cdt cvs genie on behalf of mkhouzam ***
Bug 335098: JUnit tests don't always use the DSF executor when they should

[*] MIMemoryTest.java 1.6 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/tests/MIMemoryTest.java?root=Tools_Project&r1=1.5&r2=1.6
[*] MIRegistersTest.java 1.8 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/tests/MIRegistersTest.java?root=Tools_Project&r1=1.7&r2=1.8
[*] MIExpressionsTest.java 1.14 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/tests/MIExpressionsTest.java?root=Tools_Project&r1=1.13&r2=1.14
[*] MIRunControlTest.java 1.21 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/tests/MIRunControlTest.java?root=Tools_Project&r1=1.20&r2=1.21
[*] MIDisassemblyTest.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/tests/MIDisassemblyTest.java?root=Tools_Project&r1=1.3&r2=1.4
[*] GDBProcessesTest.java 1.11 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/tests/GDBProcessesTest.java?root=Tools_Project&r1=1.10&r2=1.11
[*] MIBreakpointsTest.java 1.19 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/tests/MIBreakpointsTest.java?root=Tools_Project&r1=1.18&r2=1.19
[*] MICatchpointsTest.java 1.6 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/tests/MICatchpointsTest.java?root=Tools_Project&r1=1.5&r2=1.6

[*] ServiceEventWaitor.java 1.6 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/ServiceEventWaitor.java?root=Tools_Project&r1=1.5&r2=1.6
[*] SyncUtil.java 1.13 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/SyncUtil.java?root=Tools_Project&r1=1.12&r2=1.13

[*] GDBRemoteTracepointsTest_7_0.java 1.5 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/tests/tests_7_0/GDBRemoteTracepointsTest_7_0.java?root=Tools_Project&r1=1.4&r2=1.5
Comment 5 John Cortell CLA 2011-01-28 12:08:19 EST
(In reply to comment #3)
> Oh, and John, if you can run the JUnits on Windows with -ea, that would be
> really helpful.

I ran them with 7.2 (without -ea) and there's quite a few failures. 36 in all between the memory and expressions test.
Comment 6 John Cortell CLA 2011-01-28 15:03:30 EST
(In reply to comment #2)
> Committed to HEAD.
> 
> John, can you skim over the pattern of the solution to see it is ok?

Looks good to me. Just one thing...why are you suppressing the potential exception in the ServiceEventWaitor constructor?