Skip to content

Commit

Permalink
Add modernizer check for assertEquals(Iterable, Iterable[, String])
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ArturGajowy authored and lucesape committed Apr 13, 2017
1 parent 8566962 commit 65040fc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,9 @@
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-plugin</artifactId>
<configuration>
<violationsFiles>
<violationsFile>${air.main.basedir}/src/modernizer/violations.xml</violationsFile>
</violationsFiles>
<exclusionPatterns>
<exclusionPattern>org/joda/time/.*</exclusionPattern>
</exclusionPatterns>
Expand Down
1 change: 1 addition & 0 deletions presto-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@
<!-- To allow usage of java.util.Hashtable -->
<ignorePackages>
<ignorePackage>com.facebook.presto.server.security.util.jndi</ignorePackage>
<ignorePackage>com.facebook.presto.testing.assertions</ignorePackage>
</ignorePackages>
</configuration>
</plugin>
Expand Down
14 changes: 14 additions & 0 deletions src/modernizer/violations.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<modernizer>
<violation>
<name>org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;)V</name>
<version>1.8</version>
<comment>Use com.facebook.presto.testing.assertions.Assert.assertEquals due to TestNG #543</comment>
</violation>

<violation>
<name>org/testng/Assert.assertEquals:(Ljava/lang/Iterable;Ljava/lang/Iterable;Ljava/lang/String;)V</name>
<version>1.8</version>
<comment>Use com.facebook.presto.testing.assertions.Assert.assertEquals due to TestNG #543</comment>
</violation>
</modernizer>

0 comments on commit 65040fc

Please sign in to comment.