** Description changed: - While running OpenJDK 10 tests I noticed that quite a few tests that - depend on testng fail due to a missing guava class. + [Impact] + testng 6.9.12-2 code imports a java class from guava but does not declare a dependency on dependency on libguava-java. The actual import is not required and was reported upstream [1] and already fixed [2]. + + The patch [2] should be applied to testng to prevent failures when + running it (see output example at the bottom). + + The testsuites from openjdk 10 (and later) added a dependency to testng + which then triggered the missing class exception - please note that + openjdk-lts in bionic currently does not run any tests, which is why + this has not been (yet) fixed. + + openjdk-11 is being backported to bionic (see bug #1814133) and has + tests enable, thus requiring this fix. + + [Test Case] + Execute openjdk-lts autopkgtests from Cosmic using testng 6.9.12-2 and verify that the tests fail because of missing dependency on guava. + + After the patch is applied the tests should work fine. + + [Regression Potential] + + This change only backports a patch that actually removes a non-declare + and unnecessary dependency from testng, no regressions are expected at + all. + + + [Original Description] + While running OpenJDK 10 tests I noticed that quite a few tests that depend on testng fail due to a missing guava class. The package libguava-java has the class but it is not declared as a dependency. The bug has been reported upstream back in 2016 [1] and fixed a few days after that [2]. The guava class import with a new internal class [3]. testng should be updated to a newer version or that particular patch [3] should be applied to the existing package in both cosmic and bionic. References: [1] https://github.com/cbeust/testng/issues/1085 [2] https://github.com/cbeust/testng/pull/1086 [3] https://github.com/cbeust/testng/pull/1086/commits/deeb5847282ae3b5b185c046a8146814bf98b124 - Error output example: java.lang.NoClassDefFoundError: com/google/common/primitives/Ints - at org.testng.internal.annotations.JDK15TagFactory.createDataProviderTag(JDK15TagFactory.java:335) - at org.testng.internal.annotations.JDK15TagFactory.createTag(JDK15TagFactory.java:59) - at org.testng.internal.annotations.JDK15AnnotationFinder.findAnnotation(JDK15AnnotationFinder.java:217) - at org.testng.internal.annotations.JDK15AnnotationFinder.findAnnotation(JDK15AnnotationFinder.java:111) - at org.testng.internal.Parameters.findDataProvider(Parameters.java:326) - at org.testng.internal.Parameters.findDataProvider(Parameters.java:261) - at org.testng.internal.Parameters.handleParameters(Parameters.java:418) - at org.testng.internal.Invoker.handleParameters(Invoker.java:1240) - at org.testng.internal.Invoker.createParameters(Invoker.java:980) - at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1070) - at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker. + at org.testng.internal.annotations.JDK15TagFactory.createDataProviderTag(JDK15TagFactory.java:335) + at org.testng.internal.annotations.JDK15TagFactory.createTag(JDK15TagFactory.java:59) + at org.testng.internal.annotations.JDK15AnnotationFinder.findAnnotation(JDK15AnnotationFinder.java:217) + at org.testng.internal.annotations.JDK15AnnotationFinder.findAnnotation(JDK15AnnotationFinder.java:111) + at org.testng.internal.Parameters.findDataProvider(Parameters.java:326) + at org.testng.internal.Parameters.findDataProvider(Parameters.java:261) + at org.testng.internal.Parameters.handleParameters(Parameters.java:418) + at org.testng.internal.Invoker.handleParameters(Invoker.java:1240) + at org.testng.internal.Invoker.createParameters(Invoker.java:980) + at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1070) + at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1785896 Title: testng fails due to missing guava dependency To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/testng/+bug/1785896/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
