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 219897 - Failing tests in projectuiapi
Summary: Failing tests in projectuiapi
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 7.3
Hardware: All All
: P1 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2012-10-11 09:43 UTC by Jiri Skrivanek
Modified: 2013-02-27 08:12 UTC (History)
0 users

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 Jiri Skrivanek 2012-10-11 09:43:14 UTC
Please, fix failing tests in projectuiapi.

http://hudson4qe.cz.oracle.com/job/_Temp-projectuiapi/2/testReport/

To reproduce:

cd hg/main
ant build-test-dist -Dallmodules=projectuiapi
ant -f nbbuild/build/testdist -Dnetbeans.dest.dir=[your root]/hg/main/nbbuild/netbeans -Dtest.types=unit -Dmodules.list=ide/org-netbeans-modules-projectuiapi -Dtest.config.default.includes=**/DefaultProjectOperationsImplementationTest.class
Comment 1 Milos Kleint 2012-10-12 12:17:32 UTC
ant -f nbbuild/build/testdist -Dnetbeans.dest.dir=/Users/mkleint/src/core-main/nbbuild/netbeans -Dtest.types=unit -Dmodules.list=ide/org-netbeans-modules-projectuiapi -Dtest.config.default.includes=**/DefaultProjectOperationsImplementationTest.class

What? Buildfile: nbbuild/build/testdist is a dir!

please advice.
Comment 2 Jiri Skrivanek 2012-10-12 12:40:56 UTC
Then ant -f nbbuild/build/testdist/build.xml. With ant 1.8.4 it gets build.xml by default from supplied dir.
Comment 3 Milos Kleint 2012-10-12 13:40:00 UTC
ok, it fails consistently on the cmd line, but always passes when I run the test from the IDE? What is the difference there? how do I debug the cmd line build?

when I comment all the other tests in the file except the one failing, the test passes (even though the build itself fails for some reason, see below). Overall this looks like a setup problem to me.

do-test:
    [junit] Testsuite: org.netbeans.modules.project.uiapi.DefaultProjectOperationsImplementationTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.45 sec
    [junit] 

fail-test:

run-test:

test:

generate-html-results:
[junitreport] Processing /Users/mkleint/src/core-main/nbbuild/build/testdist/unit/results/TESTS-TestSuites.xml to /var/folders/46/zjq4yb7j4ml8gr6bkkfl94gm0000gn/T/null259346014
[junitreport] Loading stylesheet jar:file:/usr/share/ant/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 512ms
[junitreport] Deleting: /var/folders/46/zjq4yb7j4ml8gr6bkkfl94gm0000gn/T/null259346014
     [echo] Report is available at /Users/mkleint/src/core-main/nbbuild/build/testdist/unit/results/html/index.html

failtests:

BUILD FAILED
/Users/mkleint/src/core-main/nbbuild/build/testdist/build.xml:53: The following error occurred while executing this line:
/Users/mkleint/src/core-main/nbbuild/build/testdist/all-tests.xml:80: Some tests failed; see details above.
Comment 4 Jiri Skrivanek 2012-10-12 13:49:48 UTC
To debug add parameters to test.run.args in nbbuild/build/testdist/one-module.xml. Maybe order is important. This runs with <property name="test-sys-prop.NbTestCase.order" value="a-z"/>. The mentioned "fail for some reason" is probably because of previous failures. Try to remove nbbuild/build/testdist/unit/[results|work].
Comment 5 Milos Kleint 2012-10-12 14:30:27 UTC
http://hg.netbeans.org/core-main/rev/f8eb56a2e173 this seems to make the test pass for me now, I didn't fully understand what the test was testing previously.
Comment 6 Quality Engineering 2012-10-13 02:10:27 UTC
Integrated into 'main-golden', will be available in build *201210130002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f8eb56a2e173
User: Milos Kleint <mkleint@netbeans.org>
Log: #219897 make sense of the test, now behaves as method name suggests
Comment 7 Jiri Skrivanek 2012-10-15 12:57:19 UTC
Thank you.