Skip to content

Commit

Permalink
Tests: Update catalog test assertion to be more permissive (apache#7789)
Browse files Browse the repository at this point in the history
* Tests: Update catalog test assertion to be more permissive

* another assertion update
  • Loading branch information
bryanck authored Jun 7, 2023
1 parent 18c343b commit 814a22f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ public void testCreateOrReplaceTransactionConcurrentCreate() {
: "Table already exists";
Assertions.assertThatThrownBy(createOrReplace::commitTransaction)
.isInstanceOf(AlreadyExistsException.class)
.hasMessage(expectedMessage);
.hasMessageStartingWith(expectedMessage);

// validate the concurrently created table is unmodified
Table table = catalog.loadTable(TABLE);
Expand Down Expand Up @@ -2484,7 +2484,7 @@ public void tableCreationWithoutNamespace() {
() ->
catalog().buildTable(TableIdentifier.of("non-existing", "table"), SCHEMA).create())
.isInstanceOf(NoSuchNamespaceException.class)
.hasMessageEndingWith("Namespace does not exist: non-existing");
.hasMessageContaining("Namespace does not exist: non-existing");
}

private static void assertEmpty(String context, Catalog catalog, Namespace ns) {
Expand Down

0 comments on commit 814a22f

Please sign in to comment.