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 208907 - Evaluate org.netbeans.modules.ant.freeform.ArtifactProviderTest failure on Linux
Summary: Evaluate org.netbeans.modules.ant.freeform.ArtifactProviderTest failure on Linux
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Freeform (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: TEST
Depends on:
Blocks: 208442
  Show dependency tree
 
Reported: 2012-02-27 15:20 UTC by Jiri Skrivanek
Modified: 2012-03-07 18:10 UTC (History)
2 users (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 Jiri Skrivanek 2012-02-27 15:20:39 UTC
As reported in bug 208442 org.netbeans.modules.ant.freeform.ArtifactProviderTest is failing on Linux with JDK7u4. Please evaluate ASAP, escalated by JDK team. We need to know whether it's a random failure, issue in test or problem in JDK.

junit.framework.AssertionFailedError: have artifact for /home/tarle/work/comp-netbeans/btd/unit/data/example-projects/simple/build/simple-app.jar
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNotNull(Assert.java:214)
at org.netbeans.modules.ant.freeform.ArtifactProviderTest.testBuildArtifact(ArtifactProviderTest.java:72)
Comment 1 Marian Mirilovic 2012-03-01 13:33:52 UTC
Please evaluate ASAP, escalated by JDK team ... we need to know whether it's a
random failure, issue in test or problem in JDK.
Comment 2 Jesse Glick 2012-03-02 14:18:12 UTC
Reproducible with -Dtest-unit-sys-prop.NbTestCase.order=z-a, i.e. could fail randomly on any JDK 7+.
Comment 3 Jesse Glick 2012-03-02 14:35:31 UTC
core-main #2f928ad3f622
Comment 4 Jesse Glick 2012-03-02 14:44:46 UTC
By the way you should run tests with -Dtest-unit-sys-prop.NbTestCase.order=a-z if you want to eliminate a source of random failures on JDK 7+. (A future version of JUnit [1] will do something similar.)

[1] https://github.com/KentBeck/junit/pull/293
Comment 5 Jesse Glick 2012-03-02 15:24:22 UTC
Tons of tests fail when run in reverse method order that we have not cleaned up. Fixing them all would take a long time, and is not necessary for evaluating 7u4 regressions; just please test with a-z.
Comment 6 Quality Engineering 2012-03-04 09:30:54 UTC
Integrated into 'main-golden', will be available in build *201203040400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2f928ad3f622
User: Jesse Glick <jglick@netbeans.org>
Log: #208907: Evaluate org.netbeans.modules.ant.freeform.ArtifactProviderTest failure on Linux
Comment 7 Jiri Skrivanek 2012-03-05 08:58:41 UTC
If setting test-unit-sys-prop.NbTestCase.order doesn't change order defined in NbTestSuite or NbModuleSuite than it would be added to nbbuild/testdist/release.
Comment 8 Jesse Glick 2012-03-05 20:48:54 UTC
(In reply to comment #7)
> If setting test-unit-sys-prop.NbTestCase.order doesn't change order defined in
> NbTestSuite or NbModuleSuite

No, it does not change explicitly constructed suites. It only affects the order of testSomething methods in an implicit suite, which would otherwise be determined by the unpredictable results of Class.getDeclaredMethods.
Comment 9 Jiri Skrivanek 2012-03-06 09:58:36 UTC
So, I add it to nbbuild/testdist/release/build.xml.
main#d9805300a2cb
Comment 10 Quality Engineering 2012-03-07 18:10:04 UTC
Integrated into 'main-golden', will be available in build *201203071105* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d9805300a2cb
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #208907 - Enforce order of test execution in an implicit suite to prevent failures caused by the unpredictable results of Class.getDeclaredMethods.