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 208455 - Evaluate org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test.testGenerateSchema2 failure on Mac
Summary: Evaluate org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test.testGenerateSc...
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0.1
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: TEST
Depends on:
Blocks: 208445
  Show dependency tree
 
Reported: 2012-02-15 14:47 UTC by Jiri Skrivanek
Modified: 2012-03-15 12:29 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 Jiri Skrivanek 2012-02-15 14:47:25 UTC
As reported in bug 208445 org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test.testGenerateSchema2 is
failing on Mac with JDK7u4. Please, evaluate and possibly fix it.

junit.framework.AssertionFailedError: global elements expected:<1> but was:<0>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:283)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:195)
at org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test.testGenerateSchema2(SchemaGeneratorPerf2Test.java:98)
Comment 1 Marian Mirilovic 2012-02-27 14:39:02 UTC
Please evaluate ASAP, escalated by JDK team ... we need to know whether it's a random failuer, issue in test or problem in JDK.
Comment 2 Svata Dedic 2012-03-01 16:40:58 UTC
I run the test SchemaGeneratorPerf2Test on MacOS X with


java version "1.7.0_04-ea"
Java(TM) SE Runtime Environment (build 1.7.0_04-ea-b13)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b16, mixed mode)

The mentioned test (testGenerateSchema2) succeeded, but I encountered different failrures, happening rather randomly.

    [junit] ------------- ---------------- ---------------
    [junit] Testcase: testGenerateSchema2(org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test):       Caused an ERROR
    [junit] Index: 7, Size: 7
    [junit] java.lang.IndexOutOfBoundsException: Index: 7, Size: 7
    [junit]     at java.util.ArrayList.rangeCheck(ArrayList.java:604)
    [junit]     at java.util.ArrayList.get(ArrayList.java:382)
    [junit]     at java.util.Collections$UnmodifiableList.get(Collections.java:1211)
    [junit]     at org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test.testGenerateSchema2(SchemaGeneratorPerf2Test.java:111)
    [junit] 
    [junit] 
    [junit] Testcase: testDeleteExistingGlobalElement(org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test):   FAILED
    [junit] global elements expected:<0> but was:<1>
    [junit] junit.framework.AssertionFailedError: global elements expected:<0> but was:<1>
    [junit]     at org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test.testDeleteExistingGlobalElement(SchemaGeneratorPerf2Test.java:156)
    [junit] 
    [junit] 
    [junit] Test org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test FAILED


The testDeleteExistingGlobalElement failure was reported in the original bug #208445 and the HTML report. The original XML report contained failure of testGenerateSchema2 which I did not reproduced (yet).
Comment 3 Svata Dedic 2012-03-02 14:01:13 UTC
This is a test error.
The test relies on testcase being executed in text order of appearance in the source file, which is MOSTLY true on jdks usually run. 

JDK7u4 seems to really return methods in unspecified order, as noted in Class.getMethods() javadoc, even if the .class file does not actually change.

The test should have defined a TestSuite to run the tests in correct order. 

I would not consider this a 711 patch candidate; the actual code works OK.
Comment 4 Jiri Skrivanek 2012-03-05 09:14:07 UTC
OK, fix the test only in trunk.
Comment 5 Svata Dedic 2012-03-13 13:10:38 UTC
Changeset: c8e0a5488e9b
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-03-13 14:10
Message:   Issue #208455 - Evaluate org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test.testGenerateSchema2 failure on Mac: fixed
Fixed testcsase order.
Comment 6 Quality Engineering 2012-03-15 12:29:16 UTC
Integrated into 'main-golden', will be available in build *201203150400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c8e0a5488e9b
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #208455 - Evaluate org.netbeans.modules.xml.axi.SchemaGeneratorPerf2Test.testGenerateSchema2 failure on Mac: fixed
Fixed testcsase order.