Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ajantha-bhat committed Feb 2, 2023
1 parent 9d6c4f2 commit 70f2503
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ public void initialize(String name, Map<String, String> options) {
api = nessieClientBuilder.build(NessieApiV2.class);
} else {
throw new IllegalArgumentException(
"Unsupported client-api-version: " + apiVersion + ". Can only be v1 or v2");
String.format(
"Unsupported %s: " + apiVersion + ". Can only be v1 or v2",
NessieUtil.CLIENT_API_VERSION));
}

initialize(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void testListImplicitNamespaces() {
public void testNamespacesWithV1Api() {
createNamespacesAndTables();

testListTables();
verifyListTables();

List<Namespace> namespaces;
namespaces = catalog.listNamespaces(Namespace.of("foo"));
Expand All @@ -96,15 +96,15 @@ public void testNamespacesWithV1Api() {
public void testNamespacesWithV2Api() {
createNamespacesAndTables();

testListTables();
verifyListTables();

List<Namespace> namespaces;
namespaces = catalog.listNamespaces(Namespace.of("foo"));
// NessieApiV2 will not list the implicit namespaces
Assertions.assertThat(namespaces).isEqualTo(Collections.singletonList(Namespace.of("foo")));
}

private void testListTables() {
private void verifyListTables() {
List<TableIdentifier> tables = catalog.listTables(Namespace.of("foo"));
Assertions.assertThat(tables).isNotNull().hasSize(2);
tables = catalog.listTables(Namespace.of("foo", "bar"));
Expand Down

0 comments on commit 70f2503

Please sign in to comment.