This is an automated email from the ASF dual-hosted git repository.

etudenhoefner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new fbfe584f84 Tests: More permissive error message assertion in catalog 
tests (#7784)
fbfe584f84 is described below

commit fbfe584f84c83c0e15c2d578e1ea17a11a3f07db
Author: Bryan Keller <[email protected]>
AuthorDate: Tue Jun 6 12:51:34 2023 -0700

    Tests: More permissive error message assertion in catalog tests (#7784)
---
 .../test/java/org/apache/iceberg/catalog/CatalogTests.java   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java 
b/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
index 6e9a175183..b890e75b23 100644
--- a/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
+++ b/core/src/test/java/org/apache/iceberg/catalog/CatalogTests.java
@@ -219,7 +219,7 @@ public abstract class CatalogTests<C extends Catalog & 
SupportsNamespaces> {
 
     Assertions.assertThatThrownBy(() -> catalog.loadNamespaceMetadata(NS))
         .isInstanceOf(NoSuchNamespaceException.class)
-        .hasMessage("Namespace does not exist: newdb");
+        .hasMessageStartingWith("Namespace does not exist: newdb");
 
     catalog.createNamespace(NS);
     Assert.assertTrue("Namespace should exist", catalog.namespaceExists(NS));
@@ -312,7 +312,7 @@ public abstract class CatalogTests<C extends Catalog & 
SupportsNamespaces> {
 
     Assertions.assertThatThrownBy(() -> catalog.setProperties(NS, 
ImmutableMap.of("test", "value")))
         .isInstanceOf(NoSuchNamespaceException.class)
-        .hasMessage("Namespace does not exist: newdb");
+        .hasMessageStartingWith("Namespace does not exist: newdb");
   }
 
   @Test
@@ -344,7 +344,7 @@ public abstract class CatalogTests<C extends Catalog & 
SupportsNamespaces> {
 
     Assertions.assertThatThrownBy(() -> catalog.removeProperties(NS, 
ImmutableSet.of("a", "b")))
         .isInstanceOf(NoSuchNamespaceException.class)
-        .hasMessage("Namespace does not exist: newdb");
+        .hasMessageStartingWith("Namespace does not exist: newdb");
   }
 
   @Test
@@ -581,7 +581,7 @@ public abstract class CatalogTests<C extends Catalog & 
SupportsNamespaces> {
 
     Assertions.assertThatThrownBy(() -> catalog.buildTable(ident, 
OTHER_SCHEMA).create())
         .isInstanceOf(AlreadyExistsException.class)
-        .hasMessage("Table already exists: ns.table");
+        .hasMessageStartingWith("Table already exists: ns.table");
 
     Table table = catalog.loadTable(ident);
     Assert.assertEquals(
@@ -703,7 +703,7 @@ public abstract class CatalogTests<C extends Catalog & 
SupportsNamespaces> {
     Assert.assertFalse("Table should not exist", catalog.tableExists(ident));
     Assertions.assertThatThrownBy(() -> catalog.loadTable(ident))
         .isInstanceOf(NoSuchTableException.class)
-        .hasMessage("Table does not exist: ns.table");
+        .hasMessageStartingWith("Table does not exist: ns.table");
   }
 
   @Test
@@ -2053,7 +2053,7 @@ public abstract class CatalogTests<C extends Catalog & 
SupportsNamespaces> {
 
     Assertions.assertThatThrownBy(() -> catalog.buildTable(TABLE, 
SCHEMA).replaceTransaction())
         .isInstanceOf(NoSuchTableException.class)
-        .hasMessage("Table does not exist: newdb.table");
+        .hasMessageStartingWith("Table does not exist: newdb.table");
   }
 
   @Test

Reply via email to