This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 175114 - AE when running hints tests
Summary: AE when running hints tests
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: mslama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-21 14:53 UTC by Erno Mononen
Modified: 2009-12-03 04:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erno Mononen 2009-10-21 14:53:59 UTC
Several ruby hints tests are failing due to null document in CslTestBase#computeHints. Not sure what has changed so 
that the document is not necessarily loaded anymore.

junit.framework.AssertionFailedError
	at org.netbeans.junit.NbTestCase.run(NbTestCase.java:213)
	at org.netbeans.modules.csl.api.test.CslTestBase$29.run(CslTestBase.java:3762)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)

Check for example http://deadlock.netbeans.org/hudson/job/ruby-tests/279/testReport/org.netbeans.modules.ruby.hints/
AccidentalAssignmentTest/testAccidentalAssignments/? for full stacktrace. The test now consistently fails because of 
this, though not always with the same file (the test uses several files).
Comment 1 Jan Jancura 2009-10-23 09:09:45 UTC
You should open document for fileObject passed to computeHints method, and keep this document opened.
Fix your tests, please.
Comment 2 Erno Mononen 2009-10-23 12:54:35 UTC
Thanks for evaluating this and sorry to pass this back, but I think opening the document and keeping it open is 
something the CSL test infrastructure should take care of. The vast majority of the hints tests are one liners that 
just call either CslTestBase#checkHints or #findHints, e.g.:

    public void testHint1() throws Exception {
        checkHints(this, createRule(), "testfiles/accidental_assignments.rb", null);
    }


To me it makes more sense to fix this in CSL.
 
Comment 3 mslama 2009-12-02 02:56:40 UTC
jet-main #edb2ede59a18

I tried to fix this. Tests pass locally even without fix so I wait for builder if it helps or not.
Comment 4 Quality Engineering 2009-12-03 04:54:02 UTC
Integrated into 'main-golden', will be available in build *200912030200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/edb2ede59a18
User: Marek Slama <mslama@netbeans.org>
Log: #175114: Force opening document.