Skip to content

Commit

Permalink
Address PR comment
Browse files Browse the repository at this point in the history
Signed-off-by: Rupal Mahajan <[email protected]>
  • Loading branch information
rupal-bq committed Jul 5, 2023
1 parent 0eb5e53 commit be15dae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public Collection<FunctionResolver> getFunctions() {

@Override
public Table getTable(DataSourceSchemaName dataSourceSchemaName, String tableName) {
return null;
throw new RuntimeException("Unable to get table from storage engine.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.util.Collection;
Expand Down Expand Up @@ -40,7 +41,8 @@ public void getFunctions() {
@Test
public void getTable() {
SparkStorageEngine engine = new SparkStorageEngine(client);
Table table = engine.getTable(new DataSourceSchemaName("spark", "default"), "");
assertNull(table);
RuntimeException exception = assertThrows(RuntimeException.class,
() -> engine.getTable(new DataSourceSchemaName("spark", "default"), ""));
assertEquals("Unable to get table from storage engine.", exception.getMessage());
}
}

0 comments on commit be15dae

Please sign in to comment.