-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValidateLayerConsistencyTest is flaky #4211
Comments
See apache#4211 for details
While the race condition is under investigation, perhaps the test could detect the corruption and skip itself. Not sure how, given that it seems to have crashed the JVM rather than failing properly. |
If I read the sequence correctly, the error happens in the startup sequenze of the tested NetBeans instance. The error roots in an What is more, the error seems to only manifest on the CI/CD infrastructure, but not on my laptop. |
Hi, this failed today in #4327 . Quoting from the build log before it's deleted we can read (1)
Question is, if I mean, if BTW, who is McCoy? Cheers, (1)
|
Ah, I now see @jglick already posted about McCoy before... |
When creating the new repository instance (i.e. when null) should that code be synchronized as well? |
See my answer to @vieiro you can create as many repositories as you like. The problem is that only one Repository is used as the system wide repository and that needs to be the right one. |
Well, of course. I was wondering if the class Repository may be coming from different ClassLoaders at different times (first for "the real McCoy" and later "for the fake McCoy", or viceversa). If so then that could be the race condition we're looking for, right? If this is possible then maybe we could replace the |
c0313ec does not look like it would change anything. Anyway I doubt the issue is about the Normal behavior for the test would be for the class loader to be created like this
and the
I suspect the problem somehow pertains to JUnit or at least netbeans/harness/nbjunit/src/org/netbeans/junit/NbModuleSuite.java Lines 810 to 814 in a1b803a
You can see from the build log that |
Is some sort of additional tear down logic needed in some context (after test or before test)to prevent or something to setup this correctly? |
Apache NetBeans version
Apache NetBeans latest daily build
What happened
The ValidateLayerConsistencyTest seems to be flaky:
https://github.com/apache/netbeans/blob/2bdbb637653cf19179963a3150add8f99d8b6977/platform/o.n.core/test/qa-functional/src/org/netbeans/core/validation/ValidateLayerConsistencyTest.java
Sometimes fails in an assertion:
The full log of the run is zipped: fulllog.txt.zip (The quoted part start in line 109186).
The listed stack trace was retrieved using an idea from @jtulach, by creating a fake exception in the Repository constructor, fetching the stacktrace from it and storing it into a public field of that class.
This seems to be a race when initializing the META-INF based services. The
NbRepository
that is expected, is registered as such a service and thus should be available from the default lookup.This is the code in master (at time of writing):
netbeans/platform/openide.filesystems/src/org/openide/filesystems/Repository.java
Lines 348 to 376 in 66e010e
and the wrong Repository is created in line 362.
Did this work correctly in an earlier version?
No
Operating System
Linux
JDK
JDK 8 - 19 all show behavior sometimes
Apache NetBeans packaging
Other
The text was updated successfully, but these errors were encountered: