Skip to content

Commit

Permalink
Provide useful error message when test fails (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi authored Mar 28, 2021
1 parent f811d9f commit 53a02d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions coral-presto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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")
Expand Down
2 changes: 2 additions & 0 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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']}",
Expand Down

0 comments on commit 53a02d4

Please sign in to comment.