From 2be4bc4466f40860e28ca6eecd1956bff211a9d7 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Tue, 1 Aug 2023 14:58:03 +0200 Subject: [PATCH] Fix broken assertion in AbstractNessieSparkSqlExtensionTest The assertion was modified in #7308 with a workaround to avoid compilation failures. This commit reintroduces the right assertion, which became possible when Iceberg updated Nessie to 0.61+. --- .../AbstractNessieSparkSqlExtensionTest.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/integrations/spark-extensions-basetests/src/main/java/org/projectnessie/spark/extensions/AbstractNessieSparkSqlExtensionTest.java b/integrations/spark-extensions-basetests/src/main/java/org/projectnessie/spark/extensions/AbstractNessieSparkSqlExtensionTest.java index 0a73a235e78..b9795c0ceed 100644 --- a/integrations/spark-extensions-basetests/src/main/java/org/projectnessie/spark/extensions/AbstractNessieSparkSqlExtensionTest.java +++ b/integrations/spark-extensions-basetests/src/main/java/org/projectnessie/spark/extensions/AbstractNessieSparkSqlExtensionTest.java @@ -300,13 +300,7 @@ additionalRefName, defaultBranch(), currentHash)) "ASSIGN BRANCH %s TO %s AT %s IN nessie", additionalRefName, defaultBranch(), invalidHash)) .isInstanceOf(IllegalArgumentException.class) - // TODO enable this when Nessie lib will be >= 0.61 - // .hasMessage( - // Validation.HASH_OR_RELATIVE_COMMIT_SPEC_MESSAGE - // + " - but was: " - // + invalidHash) - .hasMessageContaining(Validation.HASH_RULE) - .hasMessageContaining(" - but was: " + invalidHash); + .hasMessage(Validation.HASH_OR_RELATIVE_COMMIT_SPEC_MESSAGE + " - but was: " + invalidHash); assertThatThrownBy( () -> sql( @@ -354,13 +348,7 @@ additionalRefName, defaultBranch(), currentHash)) "ASSIGN TAG %s TO %s AT %s IN nessie", additionalRefName, defaultBranch(), invalidHash)) .isInstanceOf(IllegalArgumentException.class) - // TODO enable this when Nessie lib will be >= 0.61 - // .hasMessage( - // Validation.HASH_OR_RELATIVE_COMMIT_SPEC_MESSAGE - // + " - but was: " - // + invalidHash) - .hasMessageContaining(Validation.HASH_RULE) - .hasMessageContaining(" - but was: " + invalidHash); + .hasMessage(Validation.HASH_OR_RELATIVE_COMMIT_SPEC_MESSAGE + " - but was: " + invalidHash); assertThatThrownBy( () -> sql(