diff --git a/coral-presto/build.gradle b/coral-presto/build.gradle index 832acb8fb..d7b252952 100644 --- a/coral-presto/build.gradle +++ b/coral-presto/build.gradle @@ -5,6 +5,7 @@ dependencies { compile deps.'javax-annotation' compile project(path: ':coral-hive') + testCompile deps.'assertj' testCompile deps.'presto-parser' testCompile(deps.'hive'.'hive-exec-core') { diff --git a/coral-presto/src/test/java/com/linkedin/coral/presto/rel2presto/HiveToPrestoConverterTest.java b/coral-presto/src/test/java/com/linkedin/coral/presto/rel2presto/HiveToPrestoConverterTest.java index 7263dd74e..22c91d84e 100644 --- a/coral-presto/src/test/java/com/linkedin/coral/presto/rel2presto/HiveToPrestoConverterTest.java +++ b/coral-presto/src/test/java/com/linkedin/coral/presto/rel2presto/HiveToPrestoConverterTest.java @@ -16,7 +16,7 @@ import static com.google.common.io.MoreFiles.deleteRecursively; import static com.google.common.io.RecursiveDeleteOption.ALLOW_INSECURE; -import static org.testng.Assert.*; +import static org.assertj.core.api.Assertions.assertThat; public class HiveToPrestoConverterTest { @@ -41,7 +41,7 @@ public void afterClass() throws Exception { public void testViews(String database, String view, String expectedSql) { RelNode relNode = TestUtils.convertView(database, view); String expandedSql = relToPrestoConverter.convert(relNode); - assertTrue(expandedSql.contains(expectedSql)); + assertThat(expandedSql).contains(expectedSql); } @DataProvider(name = "viewTestCases") diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index 963758ff7..ab928f73f 100644 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -1,5 +1,6 @@ def versions = [ 'antlr': '3.4', + 'assertj': '3.19.0', 'jsr305': '3.0.2', 'jline': '0.9.94', 'gson': '2.8.1', @@ -17,6 +18,7 @@ def versions = [ ext.deps = [ 'antlr': "org.antlr:antlr:${versions['antlr']}", 'antlr-runtime': "org.antlr:antlr-runtime:${versions['antlr']}", + 'assertj': "org.assertj:assertj-core:${versions['assertj']}", 'javax-annotation': "com.google.code.findbugs:jsr305:${versions['jsr305']}", 'jline': "jline:jline:${versions['jline']}", 'gson': "com.google.code.gson:gson:${versions['gson']}",