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.
We are running XML tests as a part of web-main tests and the last results are up to 16 failures in row in xml.asi.SchemaGeneratorTest.*: >>> o.n.m.xml.axi.SchemaGeneratorTest.testDeleteExistingLocalElement 1.866 4 >>> o.n.m.xml.axi.SchemaGeneratorTest.testSimpleToComplexContent 0.012 4 >>> o.n.m.xml.axi.SchemaGeneratorTest.testCreateSimpleContent 0.012 16 http://bertram.netbeans.org:8080/job/web-main-tests/709/testReport/ We have more random failures in our build but we are trying to remove at least the most unstable ones. Thanks a lot.
Still failing, currently 11 times in a row. Svata, can you please investigate? Thanks.
The test is a bad joke ... the input data contains 4 global elements, but the testcases check for exactly 3 global elements ?? It seems that the test passes only by a chance when some race condition or a _real_ error is hit. Or I am reading to code wrong.
(In reply to comment #2) > The test is a bad joke ... the input data contains 4 global elements, but the > testcases check for exactly 3 global elements ?? It seems that the test passes > only by a chance when some race condition or a _real_ error is hit. Or I am > reading to code wrong. I think that it's quite good possible - we are facing these failures since switching builds to Java 7. Probably it could contain this race condition on JDK6 regularly before. ;)
Thanks for the hint ! I'll check for differencies on both JDKs.
So - the outcome of the test relied on order of test methods, as they reused Schema mode in the AbstractModelFactory cache. Since some of the methods created and some deleted global elements, they had to execute in some specific order (testDeleteExistingGlobalElement is teextually first, so it deleted global element and subsequent tests checked the modified value). Next, since the test was written with the reuse in mind, it would fail randomly even with the correct execution ordering if the WeakReference for the cached model expired for some reason. The fix was to clear the cache in tearDown(), which hopefully makes the testcases independent. Fixed in http://hg.netbeans.org/jet-main/rev/6c433e0cfff7
Thanks a lot Svato for evaluation and fixing!
Integrated into 'main-silver', will be available in build *201307312300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/6c433e0cfff7 User: Svata Dedic <sdedic@netbeans.org> Log: #231892: tests clears weak cache between testcases. Fixed actual GE counts