Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335284 - OpenFromClipboardTests causes NPEs and test failures
Summary: OpenFromClipboardTests causes NPEs and test failures
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 04:48 EST by Dani Megert CLA
Modified: 2011-01-27 03:09 EST (History)
0 users

See Also:
daniel_megert: review+


Attachments
fix (2.24 KB, patch)
2011-01-25 23:41 EST, Deepak Azad CLA
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.