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

Bug 483514

Summary: [quickfix] Quick fix tests can be failing silently
Product: [ECD] Orion Reporter: Curtis Windatt <curtis.windatt.public>
Component: JS ToolsAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie, Olivier_Thomann
Version: 10.0   
Target Milestone: 11.0   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/61885
Whiteboard:
Bug Depends on: 483108    
Bug Blocks:    

Description Curtis Windatt CLA 2015-12-02 14:27:11 EST
Olivier first noticed this on "Test no-unreachable-1".  After some changes the test wasn't completing.  If you take the snippet of code and put it into an editor there is no 'no-unreachable' problem reported.  Instead there is a parsing problem 'illegal return'.

Somewhere in the parser changes we started reporting a different error.  The tests happen to keep working because the new problem has the same range as the old one.

Turns out the quick fix tests only check if the problem they are applying a quick fix for is the right type if and only if you specify a 'pid' in expected results.  The 'pid' is used when multiple problems are expected.

If I fix this in the tests, we get 33 failures.
Comment 1 Curtis Windatt CLA 2015-12-02 14:31:47 EST
For most of the 33 failures, it is because we tack on additional information to the problem id.  To solve that we can check for pids starting with the rule id rather than exact match.

I'm assigning this to Olivier as he is working with these tests presently.

assert.equal(pbs[0].id, options.rule.id, "The only problem should have the same id as the enabled rule");
Something like this added to the else case inside getFixes() surfaces the problem
Comment 2 Eclipse Genie CLA 2015-12-03 10:35:06 EST
New Gerrit change created: https://git.eclipse.org/r/61885

WARNING: this patchset contains 2473 new lines of code and requires a Contribution Questionnaire (CQ), as author Olivier_Thomann@ca.ibm.com is not a committer on orion/org.eclipse.orion.client. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 3 Curtis Windatt CLA 2015-12-03 17:28:36 EST
This was fixed in the gerrit change applied for Bug 483108