Skip to content

Commit a8c923e

Browse files
ArturGajowyelectrum
authored andcommitted
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 (testng-team/testng#543). False-positive results were found in ~20 tests and are fixed in the following commits.
1 parent 135ea3c commit a8c923e

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

pom.xml

+3
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,9 @@
883883
<groupId>org.gaul</groupId>
884884
<artifactId>modernizer-maven-plugin</artifactId>
885885
<configuration>
886+
<violationsFiles>
887+
<violationsFile>${air.main.basedir}/src/modernizer/violations.xml</violationsFile>
888+
</violationsFiles>
886889
<exclusionPatterns>
887890
<exclusionPattern>org/joda/time/.*</exclusionPattern>
888891
</exclusionPatterns>

presto-main/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@
335335
<!-- To allow usage of java.util.Hashtable -->
336336
<ignorePackages>
337337
<ignorePackage>com.facebook.presto.server.security.util.jndi</ignorePackage>
338+
<ignorePackage>com.facebook.presto.testing.assertions</ignorePackage>
338339
</ignorePackages>
339340
</configuration>
340341
</plugin>

src/modernizer/violations.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<modernizer>
3+
<violation>
4+
<name>org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;)V</name>
5+
<version>1.8</version>
6+
<comment>Use com.facebook.presto.testing.assertions.Assert.assertEquals due to TestNG #543</comment>
7+
</violation>
8+
9+
<violation>
10+
<name>org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/String;)V</name>
11+
<version>1.8</version>
12+
<comment>Use com.facebook.presto.testing.assertions.Assert.assertEquals due to TestNG #543</comment>
13+
</violation>
14+
</modernizer>

0 commit comments

Comments
 (0)