[SRU] testng fails due to missing guava dependency
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testng (Debian) |
Fix Released
|
Unknown
|
|||
testng (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[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.
In a bionic schroot:
$ sudo apt build-dep openjdk-lts
$ sudo apt source openjdk-lts
$ cd openjdk-
$ jtreg -v jdk/sun/misc/
- Fail case jtreg output -
(snipped)
runner starting test: sun/misc/
runner finished test: sun/misc/
Failed. Execution failed: `main' threw exception: java.lang.
runner starting test: sun/misc/
runner finished test: sun/misc/
Failed. Execution failed: `main' threw exception: java.lang.
Test results: passed: 9; failed: 2
- Success case jtreg output -
(snipped)
runner starting test: sun/misc/
runner finished test: sun/misc/
Passed. Execution successful
runner starting test: sun/misc/
runner finished test: sun/misc/
Passed. Execution successful
Test results: passed: 11
In the fail case one can also check the failure cause:
$ cat JTwork/
(snipped)
-------
[TestNG] Running:
sun/misc/
config InvokeCleaner.
test InvokeCleaner.
java.lang.
at org.testng.
(snipped)
[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:/
[2] https:/
[3] https:/
Error output example:
java.lang.
at org.testng.
at org.testng.
at org.testng.
at org.testng.
at org.testng.
at org.testng.
at org.testng.
at org.testng.
at org.testng.
at org.testng.
at org.testng.
Changed in testng (Debian): | |
status: | Unknown → Fix Released |
tags: | added: bionic cosmic |
description: | updated |
This bug was fixed in the package testng - 6.9.12-4
---------------
testng (6.9.12-4) unstable; urgency=medium
* Team upload.
[ Tiago Stürmer Daitx ] guava-dependenc y-pr1086. patch: apply upstream patch to
* d/p/remove-
remove guava dependency (Closes: #905675, LP: #1785896)
-- tony mancill <email address hidden> Wed, 08 Aug 2018 06:24:23 -0700