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.
Failing tests are part of stable test distribution. Either please fix these test or exclude them from stableBTD test config in project.properties. Test results can be found here http://hudson4qe.cz.oracle.com/view/Trunk-QE/job/StableBTD-7.2/ Also some test from java.hints is failing. Please, fix as well.
Lets start with the java.hints.declarative one, as fixing that may fix the other too as well (they contain similar stack traces). The problem for the j.h.d test is probably that it is invoked incorrectly: it sets "requires.nb.javac=true" inside its nbproject/project.properties, which means it requires our version of javac (API) prepended on the bootclasspath. It simply cannot work without it. So I guess I need precise steps how to build the test distro and how to invoke it, so that I can see how to fix it (the other option is to disable the tests, but that is mostly equivalent to disabling all Java tests on hudson4qe, which seems crazy to me). Thanks.
cd /myrepo ant build-test-dist ant -f nbbuild/build/testdist -Dnetbeans.dest.dir=/myrepo/nbbuild/netbeans -Dtest.types=unit -Dtest.config=stableBTD or if you want to run just tests from selected module ant build-test-dist -Dallmodules=java.hits ant -f nbbuild/build/testdist -Dnetbeans.dest.dir=/myrepo/nbbuild/netbeans -Dtest.types=unit -Dtest.config=stableBTD -Dmodules.list=java/org-netbeans-modules-java-hints On hudson, tests run against full daily build with JDK6 and JDK7.
Created attachment 120342 [details] Proposed patch. A fix for the test distribution that fixes the java.hints.declarative part. May also fix the other two parts, but I don't really have time to test - either Svata will need to take a look, or we will need to wait until hudson4qe runs with this patch applied. It would be good if the maintainer of the test distro could review, and apply the patch. Alternatively, I can apply it myself, if it is considered to be OK.
The patch fixes ScanUtilsTest and HintsTaskTest. But other tests in java.hints.infrastructure, java.source.parsing and java.source.usages fail regardless of the patch. I run tests on Windows 7x64, JDK6u33. ant -f nbbuild/build/testdist -Dnetbeans.dest.dir=D:/hg/main/nbbuild/netbeans -Dtest.config=stableBTD -Dmodules.list=java/org-netbeans-modules-java-source:java/org-netbeans-modules-java-hints:java/org-netbeans-modules-java-hints-declarative -Dtest-sys-prop.ignore.random.failures=true I agree with applying of proposed patch (do it yourself please) but also look at remaining failures.
Created attachment 120470 [details] Results with patch.
Created attachment 120471 [details] Results without patch.
Integrated into 'main-golden', will be available in build *201206080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/882a8ac0e66d User: Jan Lahoda <jlahoda@netbeans.org> Log: #213502: test distro should honor the requires.nb.javac property
After the above patch, the tests should be run with out version of nb-javac-api on bootclasspath if appropriate. One more problem found by Jirka in IndexerTransactionTest is call: .replaceAll("/", File.separator) for which the strings are interpreted as the regexp pattern and regexp replacement pattern, respectively. And a string containing only backslash is not a valid regexp replacement pattern, fixing: http://hg.netbeans.org/main-silver/rev/38cef480d0f6 The test is still failing for me - Tomas please look at it and either fix or disable it. Thanks.
Please, remove all occurrences of .replaceAll("/", File.separator) in IndexerTransactionTest. It is used in new File(...) and there is not necessary to convert slash to backslash.
Sorry - I did not notice there is more than one occurrence of that. Changing the "replaceAll" to "replace" should be sufficient and arguable more correct. If you prefer, I can do that.
Integrated into 'main-golden', will be available in build *201206130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/7c22133ea221 User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #213502 - Quoting of classpath is needed when IDE is on path with space.
The IndexerTransactionTest fixed, at least on my Mac. Fixed jet-main 0e15941913b3
Integrated into 'main-golden', will be available in build *201206150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0e15941913b3 User: Tomas Zezula <tzezula@netbeans.org> Log: #213502:ScanUtilsTest and IndexerTransactionTest fail
I verified it in trunk. Please, transplant changeset 0e15941913b3 to release72 branch. AFAIK, high-resistance process doesn't apply to tests, so please proceed without review.
I agree with adding the changeset into the release72 branch.
Transplanted into release 7.2: releases ab89d58522e1
Integrated into 'releases', will be available in build *201206212341* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/ab89d58522e1 User: Tomas Zezula <tzezula@netbeans.org> Log: #213502:ScanUtilsTest and IndexerTransactionTest fail
IndexerTransactionTest is still failing on Solaris, so I excluded it in release72 branch. Other tests passed.
Integrated into 'releases', will be available in build *201206252201* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/793db6d2b68a User: Jiri Skrivanek <jskrivanek@netbeans.org> Log: #213502 - Excluding test failing on Solaris.