Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4528

Test Results window showing 'Running' when AfterClass writes to the console

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 12.0, 11.2, 11.3
    • 12.0.1
    • projects - Gradle
    • None
    • Linux, JDK8, JDK11

    Description

      Reproduction scenario:
      1. Create a new JAVA Gradle project in NB12
      2. Create a new Test code as follows (using either JUnit 4 or TestNG 6+)

      import org.junit.AfterClass;
      import org.junit.Test;
      public class ExampleTest {
        @AfterClass
        public static void cleanup() {
          // if you comment out the next line, the TestResults window will properly show the test results
          System.out.println("Cleaned");
        }
        @Test
        public void testSomeMethod() {
          System.out.println("Doing something.");
        }
      }
      

      3. Hit CTLR+F6 and check the the results in the `Test Results` window. It will still show 'Running' as opposed to the actual test result.
      4. Comment out the line System.out.println("Cleaned"); and hit CTLR+F6 again and check the TestResults window.

      Bug applies to NB11 and above. Tested on LINUX, JDK11 and JDK8. It does not matter, if the write to the console is directly, or through a logger.
      Using a MAVEN project works just OK.

      Attachments

        Activity

          People

            lkishalmi Laszlo Kishalmi
            ratcashdev Ratcash Developer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m