From 65040fc81672dc1397372df0717cc9b4dd4b747d Mon Sep 17 00:00:00 2001 From: Artur Gajowy Date: Mon, 23 Jan 2017 08:59:26 +0100 Subject: [PATCH] Add modernizer check for assertEquals(Iterable, Iterable[, String]) This prevents false positive test results when comparing iterables (most notably: MaterializedResult instances) due to TestNG bug (https://github.com/cbeust/testng/issues/543). False-positive results were found in ~20 tests and are fixed in the following commits. --- pom.xml | 3 +++ presto-main/pom.xml | 1 + src/modernizer/violations.xml | 14 ++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 src/modernizer/violations.xml diff --git a/pom.xml b/pom.xml index 27798afb9e02..7ce082d5073c 100644 --- a/pom.xml +++ b/pom.xml @@ -883,6 +883,9 @@ org.gaul modernizer-maven-plugin + + ${air.main.basedir}/src/modernizer/violations.xml + org/joda/time/.* diff --git a/presto-main/pom.xml b/presto-main/pom.xml index 72fbe8f830d4..8d6a70cafaab 100644 --- a/presto-main/pom.xml +++ b/presto-main/pom.xml @@ -335,6 +335,7 @@ com.facebook.presto.server.security.util.jndi + com.facebook.presto.testing.assertions diff --git a/src/modernizer/violations.xml b/src/modernizer/violations.xml new file mode 100644 index 000000000000..ac4d751079d8 --- /dev/null +++ b/src/modernizer/violations.xml @@ -0,0 +1,14 @@ + + + + org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;)V + 1.8 + Use com.facebook.presto.testing.assertions.Assert.assertEquals due to TestNG #543 + + + + org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/String;)V + 1.8 + Use com.facebook.presto.testing.assertions.Assert.assertEquals due to TestNG #543 + +