You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/09/15 20:18:13 UTC

[GitHub] [netbeans] matthiasblaesing commented on pull request #2350: [NETBEANS-4778] - Mavenize TestNG and upgrade from 6.8.1 to 6.14.3

matthiasblaesing commented on pull request #2350:
URL: https://github.com/apache/netbeans/pull/2350#issuecomment-692955974


   > > The javadoc file for 6.14.3 is empty - this looks broken.
   > The javadoc is empty from the maven repository, I used the javadoc version 6.13.1 since there are no API changes.
   
   Ok. It would be good to make sure upstream is aware of the problem, but not required.
   
   > > testng 6.14.3 has two transitive dependencies: bsh (2.0b6) + jcommander (1.72) at least jcommander was part of the dist package used before - don't we need it?
   > You were right about needing jcommander, I added it and everything run fine (no need for bsh).
   
   Good - that is in line with the contents of the "-dist.jar", which from my quick look did not ship with bsh.
   
   > > Was a project (preferably both ant and maven) tested, whether the results are still correctly reported?
   > I tested a maven and ant project, they both compile and run the tests successfully, cheked that the javadoc works to.
   
   Thanks!
   
   > > Does the unittest from java.j2seproject still run? (direct dependency on the module)
   > How can I check this? I compared the build logs and there are no errors and have the same number of warnings .
   
   To run the unittests - you can run:
   
   ```shell
   ant -f /home/matthias/src/netbeans/java/java.j2seproject -Dcontinue.after.failing.tests=true -Dtest-unit-sys-prop.ignore.random.failures=true test-unit
   ```
   
   Or open the project in the IDE, right click on the project node and choose "Test".
   
   There is another problem here. You did not introduce it, but it would be great if you could integrate it:
   
   <details>
     <summary>Suggested changes</summary>
   
   ```diff
   # This patch file was generated by NetBeans IDE
   # It uses platform neutral UTF-8 encoding and \n newlines.
   --- a/java/java.j2seproject/nbproject/project.properties
   +++ b/java/java.j2seproject/nbproject/project.properties
   @@ -26,8 +26,9 @@
    test.unit.run.cp.extra=${tools.jar}
    test-unit-sys-prop.test.bridge.jar=${netbeans.dest.dir}/${nb.cluster.extide.dir}/ant/nblib/bridge.jar
    test-unit-sys-prop.test.ant.home=${netbeans.dest.dir}/${nb.cluster.extide.dir}/ant
   -test-unit-sys-prop.test.junit.jar=${nb_all}/libs.junit4/external/junit-4.12.jar
   -test-unit-sys-prop.test.testng.jar=${nb_all}/libs.testng/external/testng-6.14.3.jar
   +test-unit-sys-prop.test.junit.jar=${nb_all}/platform/libs.junit4/external/junit-4.12.jar
   +test-unit-sys-prop.test.testng.jar=${nb_all}/platform/libs.testng/external/testng-6.14.3.jar
   +test-unit-sys-prop.test.jcommander.jar=${nb_all}/platform/libs.testng/external/jcommander-1.78.jar
    extra.module.files=ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar
    jnlp.indirect.jars=ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar
    
   # This patch file was generated by NetBeans IDE
   # It uses platform neutral UTF-8 encoding and \n newlines.
   --- a/java/java.j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/BuildImplTest.java
   +++ b/java/java.j2seproject/test/unit/src/org/netbeans/modules/java/j2seproject/BuildImplTest.java
   @@ -67,6 +67,7 @@
    
        private File junitJar;
        private File testNGJar;
   +    private File jcommanderJar;
    
        @Override protected Level logLevel() {
            return Level.FINE;
   @@ -91,6 +92,10 @@
            assertNotNull("must set test.testng.jar", tngJarProp);
            testNGJar = new File(tngJarProp);
            assertTrue("file " + testNGJar + " exists", testNGJar.isFile());
   +        String jcommanderJarProp = System.getProperty("test.jcommander.jar");
   +        assertNotNull("must set test.jcommander.jar", jcommanderJarProp);
   +        jcommanderJar = new File(jcommanderJarProp);
   +        assertTrue("file " + jcommanderJar + " exists", jcommanderJar.isFile());
            MockLookup.setLayersAndInstances(new IOP(), new IFL());
        }
    
   @@ -142,7 +147,7 @@
    
        private Properties getProperties() {
            Properties p = new Properties();
   -        p.setProperty("libs.junit.classpath", testNGJar.getAbsolutePath()  + ":" + junitJar.getAbsolutePath());
   +        p.setProperty("libs.junit.classpath", testNGJar.getAbsolutePath()  + ":" + junitJar.getAbsolutePath()+ ":" + jcommanderJar.getAbsolutePath());
            return p;
        }
   
   ```
   
   </details>


----------------------------------------------------------------
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.

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



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

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