Dear maintainer, Please consider the following patch which applies the PR 1096 [1] change.
thanks On Tue, Aug 7, 2018 at 8:09 PM Tiago Stürmer Daitx <tiago.da...@canonical.com> wrote: > > Package: testng > Version: 6.9.12-3 > Severity: normal > > Dear Maintainer, > > 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 was replaced 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. > > 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. > > Regards, > Tiago Daitx > > -- System Information: > Debian Release: buster/sid > APT prefers cosmic > APT policy: (500, 'cosmic'), (400, 'cosmic-proposed') > Architecture: amd64 (x86_64) > > Kernel: Linux 4.15.0-23-generic (SMP w/4 CPU cores) > Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), > LANGUAGE=en_US (charmap=UTF-8) > Shell: /bin/sh linked to /bin/dash > Init: systemd (via /run/systemd/system) > LSM: AppArmor: enabled > > Versions of packages testng depends on: > ii libbsh-java 2.0b4-19 > pn libjcommander-java <none> > > Versions of packages testng recommends: > ii ant 1.10.4-2 > ii junit4 4.12-7 > pn libyaml-snake-java <none> > > testng suggests no packages. -- Tiago Stürmer Daitx Software Engineer tiago.da...@canonical.com PGP Key: 4096R/F5B213BE (hkp://keyserver.ubuntu.com) Fingerprint = 45D0 FE5A 8109 1E91 866E 8CA4 1931 8D5E F5B2 13BE
diff -Nru testng-6.9.12/debian/changelog testng-6.9.12/debian/changelog --- testng-6.9.12/debian/changelog 2018-07-30 12:53:55.000000000 -0300 +++ testng-6.9.12/debian/changelog 2018-08-07 20:16:34.000000000 -0300 @@ -1,3 +1,10 @@ +testng (6.9.12-4) UNRELEASED; urgency=medium + + * d/p/remove-guava-dependency-pr1086.patch: apply upstream patch to + remove guava dependency (Closes: #905675, LP: #1785896) + + -- Tiago Stürmer Daitx <tiago.da...@ubuntu.com> Tue, 07 Aug 2018 23:16:34 +0000 + testng (6.9.12-3) unstable; urgency=medium * Team upload. diff -Nru testng-6.9.12/debian/patches/remove-guava-dependency-pr1086.patch testng-6.9.12/debian/patches/remove-guava-dependency-pr1086.patch --- testng-6.9.12/debian/patches/remove-guava-dependency-pr1086.patch 1969-12-31 21:00:00.000000000 -0300 +++ testng-6.9.12/debian/patches/remove-guava-dependency-pr1086.patch 2018-08-07 20:16:34.000000000 -0300 @@ -0,0 +1,56 @@ +From deeb5847282ae3b5b185c046a8146814bf98b124 Mon Sep 17 00:00:00 2001 +From: Julien Herr <jul...@herr.fr> +Date: Thu, 7 Jul 2016 23:04:24 +0200 +Subject: [PATCH] Fix #1085 Remove Guava dependency + +--- + .../internal/annotations/JDK15TagFactory.java | 2 +- + .../org/testng/internal/collections/Ints.java | 19 +++++++++++++++++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + create mode 100644 src/main/java/org/testng/internal/collections/Ints.java + +diff --git a/src/main/java/org/testng/internal/annotations/JDK15TagFactory.java b/src/main/java/org/testng/internal/annotations/JDK15TagFactory.java +index 7e79166d1..7ed9cc19e 100755 +--- a/src/main/java/org/testng/internal/annotations/JDK15TagFactory.java ++++ b/src/main/java/org/testng/internal/annotations/JDK15TagFactory.java +@@ -6,7 +6,6 @@ + import java.util.List; + import java.util.Set; + +-import com.google.common.primitives.Ints; + import org.testng.IAnnotationTransformer; + import org.testng.TestNGException; + import org.testng.annotations.AfterClass; +@@ -37,6 +36,7 @@ + import org.testng.annotations.Test; + import org.testng.collections.Lists; + import org.testng.internal.Utils; ++import org.testng.internal.collections.Ints; + + /** + * This class creates implementations of IAnnotations based on the JDK5 +diff --git a/src/main/java/org/testng/internal/collections/Ints.java b/src/main/java/org/testng/internal/collections/Ints.java +new file mode 100644 +index 000000000..1194230f6 +--- /dev/null ++++ b/src/main/java/org/testng/internal/collections/Ints.java +@@ -0,0 +1,19 @@ ++package org.testng.internal.collections; ++ ++import java.util.ArrayList; ++import java.util.List; ++ ++public final class Ints { ++ ++ private Ints() { ++ throw new Error(); ++ } ++ ++ public static List<Integer> asList(int... ints) { ++ ArrayList<Integer> result = new ArrayList<>(ints.length); ++ for (int val : ints) { ++ result.add(val); ++ } ++ return result; ++ } ++} diff -Nru testng-6.9.12/debian/patches/series testng-6.9.12/debian/patches/series --- testng-6.9.12/debian/patches/series 2018-07-30 12:32:58.000000000 -0300 +++ testng-6.9.12/debian/patches/series 2018-08-07 20:16:04.000000000 -0300 @@ -1 +1,2 @@ version_java.patch +remove-guava-dependency-pr1086.patch