homberghp opened a new issue, #8614:
URL: https://github.com/apache/netbeans/issues/8614

   ### Apache NetBeans version
   
   Apache NetBeans 26
   
   ### What happened
   
   While trying to triage #8560, I ran the tests for the package 
`org.netbeans.modules.java.api.common.queries;`  because it 
   contains the file 
`org.netbeans.modules.java.api.common.queries.ModuleInfoAccessibilityQueryImpl` 
 that @pedro-w metions in his patch.
   
   The failures are: (ant output)
   ```shell
       [junit] ------------- ---------------- ---------------
       [junit] Testcase: 
testRootsChanges(org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest):
  FAILED
       [junit] expected:<[-XD-Xmodule:org.nb.App, --add-reads, 
org.nb.App=ALL-UNNAMED]> but was:<[]>
       [junit] junit.framework.AssertionFailedError: 
expected:<[-XD-Xmodule:org.nb.App, --add-reads, org.nb.App=ALL-UNNAMED]> but 
was:<[]>
       [junit]  at 
org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest.testRootsChanges(UnitTestsCompilerOptionsQueryImplTest.java:215)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [junit] Jun 23, 2025 2:57:31 PM 
org.netbeans.modules.java.source.parsing.JavacParser validateSourceLevel
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
       [junit]  at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       [junit]  at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:84)
       [junit]  at 
org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:489)
       [junit]  at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:410)
       [junit]  at java.base/java.lang.Thread.run(Thread.java:840)
       [junit] WARNING: Even though the source level of 
/home/hom/homberghp/netbeans/master/java/java.api.common/build/test/unit/work/o.n.m.j.a.c.q.U/jdktiism/src
 is set to: 9, java.lang.AssertionError cannot be found on the bootclasspath: 
       [junit] 
       [junit] 
       [junit] 
       [junit] Testcase: 
testModuleInfoChanges(org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest):
     FAILED
       [junit] expected:<[-XD-Xmodule:org.nb.App, --add-reads, 
org.nb.App=ALL-UNNAMED]> but was:<[]>
       [junit] Working directory: 
/home/hom/homberghp/netbeans/master/java/java.api.common/build/test/unit/work/o.n.m.j.a.c.q.U/jdktiism
       [junit] junit.framework.AssertionFailedError: 
expected:<[-XD-Xmodule:org.nb.App, --add-reads, org.nb.App=ALL-UNNAMED]> but 
was:<[]>
       [junit]  at 
org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest.testModuleInfoChanges(UnitTestsCompilerOptionsQueryImplTest.java:258)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
       [junit]  at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       [junit]  at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:84)
       [junit]  at 
org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:489)
       [junit]  at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:410)
       [junit]  at java.base/java.lang.Thread.run(Thread.java:840)
       [junit] 
       [junit] 
       [junit] Testcase: 
testJDK9_TestModule(org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest):
       FAILED
       [junit] expected:<[--add-reads, org.nb.AppTest=ALL-UNNAMED]> but was:<[]>
       [junit] junit.framework.AssertionFailedError: expected:<[--add-reads, 
org.nb.AppTest=ALL-UNNAMED]> but was:<[]>
       [junit]  at 
org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest.testJDK9_TestModule(UnitTestsCompilerOptionsQueryImplTest.java:145)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
       [junit]  at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       [junit]  at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:84)
       [junit]  at 
org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:489)
       [junit]  at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:410)
       [junit]  at java.base/java.lang.Thread.run(Thread.java:840)
       [junit] 
       [junit] 
       [junit] Testcase: 
testSourceLevelChanges(org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest):
    FAILED
       [junit] expected:<[-XD-Xmodule:org.nb.App, --add-reads, 
org.nb.App=ALL-UNNAMED]> but was:<[]>
       [junit] junit.framework.AssertionFailedError: 
expected:<[-XD-Xmodule:org.nb.App, --add-reads, org.nb.App=ALL-UNNAMED]> but 
was:<[]>
       [junit]  at 
org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest.testSourceLevelChanges(UnitTestsCompilerOptionsQueryImplTest.java:184)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
       [junit]  at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       [junit]  at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:84)
       [junit]  at 
org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:489)
       [junit]  at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:410)
       [junit]  at java.base/java.lang.Thread.run(Thread.java:840)
       [junit] 
       [junit] 
       [junit] Testcase: 
testModuleInfoCreation(org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest):
    FAILED
       [junit] expected:<[-XD-Xmodule:org.nb.App, --add-reads, 
org.nb.App=ALL-UNNAMED]> but was:<[]>
       [junit] junit.framework.AssertionFailedError: 
expected:<[-XD-Xmodule:org.nb.App, --add-reads, org.nb.App=ALL-UNNAMED]> but 
was:<[]>
       [junit]  at 
org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest.testModuleInfoCreation(UnitTestsCompilerOptionsQueryImplTest.java:239)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
       [junit]  at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       [junit]  at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:84)
       [junit]  at 
org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:489)
       [junit]  at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:410)
       [junit]  at java.base/java.lang.Thread.run(Thread.java:840)
       [junit] 
       [junit] 
       [junit] Testcase: 
testJDK9_TestInlinedIntoSourceModule(org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest):
      FAILED
       [junit] expected:<[-XD-Xmodule:org.nb.App, --add-reads, 
org.nb.App=ALL-UNNAMED]> but was:<[]>
       [junit] junit.framework.AssertionFailedError: 
expected:<[-XD-Xmodule:org.nb.App, --add-reads, org.nb.App=ALL-UNNAMED]> but 
was:<[]>
       [junit]  at 
org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest.testJDK9_TestInlinedIntoSourceModule(UnitTestsCompilerOptionsQueryImplTest.java:124)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [junit]  at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
       [junit]  at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       [junit]  at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:84)
       [junit]  at 
org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:489)
       [junit]  at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:410)
       [junit]  at java.base/java.lang.Thread.run(Thread.java:840)
       [junit] 
       [junit] 
       [junit] Test 
org.netbeans.modules.java.api.common.queries.UnitTestsCompilerOptionsQueryImplTest
 FAILED
   
   BUILD SUCCESSFUL
   Total time: 3 seconds
   
   ```
   
   These failures keep me from proposing a PR as proposed in #8560.
   
   ### Language / Project Type / NetBeans Component
   
   NB module java/java.api.common 
   
   ### How to reproduce
   
   Build the module `java/java.api.common`
   run the test with netbeans or with ant. The command line for ant is 
   ```
   ant  -Dtest.type=unit -Dcontinue.after.failing.tests=true 
-Dtest.includes=org/netbeans/modules/java/api/common/queries/UnitTestsCompilerOptionsQueryImplTest.java
 test-single
   ```
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   ubuntu 24.04
   
   ### JDK
   
   17 and 21
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   This problem is repeatable.
   
   Not sure if these tests are still relevant. Currently the build seems to 
pass with either these failures, or the tests are not run.
   
   
   
   ### Are you willing to submit a pull request?
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to