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

Bug 335284

Summary: OpenFromClipboardTests causes NPEs and test failures
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: DebugAssignee: Deepak Azad <deepakazad>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P1 Flags: daniel_megert: review+
Version: 3.7   
Target Milestone: 3.7 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
fix daniel_megert: review+

Description Dani Megert CLA 2011-01-25 04:48:19 EST
I20110124-1345.

OpenFromClipboardTests causes NPEs and test failures.
Comment 1 Deepak Azad CLA 2011-01-25 06:45:24 EST
The test works fine when ran in isolation. It causes problems when run from org.eclipse.jdt.debug.tests.AutomatedSuite. I will take a look.
Comment 2 Deepak Azad CLA 2011-01-25 23:41:28 EST
Created attachment 187609 [details]
fix

There were 2 problems
- The test was not added to AutomatedSuite correctly
- Once this was done, the tests were failing at OpenFromClipboardAction.executeRunnable(IRunnableWithProgress) line 408. This is because debug tests are not run in UI thread (see javadoc of DebugSuite.run(...))
Comment 3 Dani Megert CLA 2011-01-26 03:42:28 EST
Thanks Deepak. The patch is good. I added a comment why we need to use #suite() in AutomatedSuite.

Committed to HEAD and released into I20110126-0800.
Comment 4 Dani Megert CLA 2011-01-27 03:09:37 EST
Verified in I20110126-0800: all JDT Debug tests passed.