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

   ### Apache NetBeans version
   
   Apache NetBeans 28 latest daily build
   
   ### What happened
   
   Unexpected error notification pops up after running tests:
   
   ```text
   java.lang.AssertionError
        at 
org.netbeans.modules.gsf.testrunner.ui.api.TestsuiteNode.displayReport(TestsuiteNode.java:208)
        at 
org.netbeans.modules.gsf.testrunner.ui.RootNodeChildren.displayReport(RootNodeChildren.java:174)
        at 
org.netbeans.modules.gsf.testrunner.ui.RootNode.displayReport(RootNode.java:160)
        at 
org.netbeans.modules.gsf.testrunner.ui.ResultPanelTree.displayReport(ResultPanelTree.java:192)
        at 
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:565)
   [catch] at 
org.netbeans.modules.gsf.testrunner.ui.ResultDisplayHandler$3.run(ResultDisplayHandler.java:404)
        at 
java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at 
java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:723)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:702)
        at 
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
        at 
java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at 
java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at 
java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at 
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at 
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at 
java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
   ```
   
   Narrowed the issue down to the following circumstances:
   
   1. Gradle Java project
   2. JUnit Jupiter tests
   3. Using `@ParameterizedTest`
   4. At least two separate JUnit test class files share the same method name 
(and both use `@ParameterizedTest`)
   
   Under these circumstances, the [assertion at 
TestsuiteNode.java:208](https://github.com/apache/netbeans/blob/02b2c5b1c830bad2a50a64d1818be6147db481c0/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/api/TestsuiteNode.java#L208)
 expects that the `suiteName` equals the report's `getSuiteClassName()` but 
this fails.  Debugging a local build, the `suiteName` in this case appears to 
be the **method** name.
   
   ## Expected:
   
   Using the same situation with a Maven build, the *Test Results* window shows 
two classes with the parameterized tests nested within each:
   
   <img width="476" height="339" alt="Image" 
src="https://github.com/user-attachments/assets/70797ee3-5a97-43ca-a737-fda116096b32";
 />
   
   ## Actual (dev-02b2c5b1c830bad2a50a64d1818be6147db481c0):
   
   Using a Gradle build, the parameterized test method name appears as its own 
suite, with only one set of results and it's unclear from which of the two test 
classes the results are reporting from:
   
   <img width="475" height="373" alt="Image" 
src="https://github.com/user-attachments/assets/3a8d22a6-3b34-4e77-862c-e3041dc1cd90";
 />
   
   ## NB27 behavior:
   
   NB27 doesn't bubble up the assertion, but notice that its Test Results 
window shows a different (broken) behavior -- the parameterized tests are 
listed twice, but the "normal" `@Test` methods and the class names are missing:
   
   <img width="467" height="359" alt="Image" 
src="https://github.com/user-attachments/assets/192b27b9-2266-4354-9891-fed9d0a44363";
 />
   
   ### Language / Project Type / NetBeans Component
   
   Gradle Java project with JUnit 5 Jupiter tests
   
   ### How to reproduce
   
   Minimal reproducer Gradle project with test sources:
   
   
[gradleproject.zip](https://github.com/user-attachments/files/22630899/gradleproject.zip)
   
   ### Did this work correctly in an earlier version?
   
   Apache NetBeans 27
   
   ### Operating System
   
   WSL2 on Windows 11
   
   ### JDK
   
   24.0.2; OpenJDK 64-Bit Server VM 24.0.2+12
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to