diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/BaseFileBasedSystemAccessControlTest.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/BaseFileBasedSystemAccessControlTest.java index 2fa79c6a4bf7..532e10ad4339 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/BaseFileBasedSystemAccessControlTest.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/BaseFileBasedSystemAccessControlTest.java @@ -1011,7 +1011,7 @@ public void testQuery() public void testInvalidQuery() { assertThatThrownBy(() -> newFileBasedSystemAccessControl("query-invalid.json")) - .getRootCause().hasMessage("A valid query rule cannot combine an queryOwner condition with access mode 'execute'"); + .rootCause().hasMessage("A valid query rule cannot combine an queryOwner condition with access mode 'execute'"); } @Test diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestS3WrongRegionPicked.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestS3WrongRegionPicked.java index cc8240333754..390fee01923b 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestS3WrongRegionPicked.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/TestS3WrongRegionPicked.java @@ -38,7 +38,7 @@ public void testS3WrongRegionSelection() String tableName = "s3_region_test_" + randomNameSuffix(); queryRunner.execute("CREATE TABLE default." + tableName + " (a int) WITH (external_location = 's3://" + bucketName + "/" + tableName + "')"); assertThatThrownBy(() -> queryRunner.execute("SELECT * FROM default." + tableName)) - .getRootCause() + .rootCause() .hasMessageContaining("Status Code: 400") .hasMessageContaining("Error Code: AuthorizationHeaderMalformed"); // That is how Minio reacts to bad region } diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java index 50b0be97946e..b05b558188d4 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java @@ -231,7 +231,7 @@ protected void verifyConcurrentAddColumnFailurePermissible(Exception e) { assertThat(e) .hasMessageStartingWith("Failed to add column: Failed to replace table due to concurrent updates") - .getRootCause() + .rootCause() .hasMessageContaining("Cannot update Iceberg table: supplied previous location does not match current location"); } diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergV2.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergV2.java index efca9561dd5f..8616b6356c50 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergV2.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergV2.java @@ -353,7 +353,7 @@ public void testDowngradingV2TableToV1Fails() assertEquals(loadTable(tableName).operations().current().formatVersion(), 2); assertThatThrownBy(() -> query("ALTER TABLE " + tableName + " SET PROPERTIES format_version = 1")) .hasMessage("Failed to set new property values") - .getRootCause() + .rootCause() .hasMessage("Cannot downgrade v2 table to v1"); } diff --git a/plugin/trino-ignite/src/test/java/io/trino/plugin/ignite/TestIgniteConnectorTest.java b/plugin/trino-ignite/src/test/java/io/trino/plugin/ignite/TestIgniteConnectorTest.java index 2a265f4b6dab..f3ade29f59fb 100644 --- a/plugin/trino-ignite/src/test/java/io/trino/plugin/ignite/TestIgniteConnectorTest.java +++ b/plugin/trino-ignite/src/test/java/io/trino/plugin/ignite/TestIgniteConnectorTest.java @@ -161,7 +161,7 @@ public void testCreateTableWithCommaPropertyColumn() String tableWithQuote = "create_table_with_unsupported_quote_column"; String tableDefinitionWithQuote = "(`a\"b` bigint primary key, c varchar)"; assertThatThrownBy(() -> onRemoteDatabase().execute("CREATE TABLE " + tableWithQuote + tableDefinitionWithQuote)) - .getRootCause() + .rootCause() .hasMessageContaining("Failed to parse query"); // Test the property column with comma