From 6c0cd29c7a8d5ae15d9fd0d441864ea7b868e0d4 Mon Sep 17 00:00:00 2001 From: Martin Traverso Date: Wed, 8 Nov 2023 11:00:01 -0800 Subject: [PATCH] Turn off bootstrap logging in tests --- .../trino/jdbc/TestTrinoDatabaseMetaData.java | 1 + ...seFileBasedConnectorAccessControlTest.java | 1 + .../TestFileBasedSystemAccessControl.java | 7 ++- .../plugin/base/util/TestingHttpServer.java | 1 + .../io/trino/plugin/atop/TestAtopPlugin.java | 7 ++- .../io/trino/plugin/jdbc/TestJmxStats.java | 7 ++- .../plugin/jdbc/TestingH2JdbcModule.java | 4 +- .../plugin/bigquery/TestBigQueryPlugin.java | 3 +- .../cassandra/TestCassandraConnector.java | 3 +- .../clickhouse/TestClickHousePlugin.java | 7 ++- .../plugin/deltalake/TestDeltaLakePlugin.java | 41 ++++++++++---- .../plugin/druid/TestDruidJdbcPlugin.java | 7 ++- .../google/sheets/TestSheetsPlugin.java | 5 +- .../io/trino/plugin/hive/TestHivePlugin.java | 42 ++++++++++++--- .../plugin/hive/TestHiveConnectorFactory.java | 4 +- .../hive/TestingHiveConnectorFactory.java | 14 ++++- .../plugin/hudi/TestHudiConnectorFactory.java | 4 +- .../io/trino/plugin/hudi/TestHudiPlugin.java | 29 +++++++--- .../iceberg/TestIcebergConnectorFactory.java | 5 +- .../plugin/iceberg/TestIcebergPlugin.java | 53 +++++++++++++------ .../trino/plugin/ignite/TestIgnitePlugin.java | 7 ++- .../trino/plugin/jmx/TestJmxSplitManager.java | 3 +- .../trino/plugin/kafka/TestKafkaPlugin.java | 6 +++ .../plugin/kinesis/TestKinesisPlugin.java | 1 + .../TestKinesisTableDescriptionSupplier.java | 1 + .../s3config/TestS3TableConfigClient.java | 1 + .../io/trino/plugin/kudu/TestKuduPlugin.java | 7 ++- .../plugin/mariadb/TestMariaDbPlugin.java | 21 ++++++-- .../trino/plugin/mongodb/TestMongoPlugin.java | 7 ++- .../trino/plugin/mysql/TestMySqlPlugin.java | 20 +++++-- .../trino/plugin/oracle/TestOraclePlugin.java | 7 ++- .../plugin/phoenix5/TestPhoenixPlugin.java | 7 ++- .../postgresql/TestPostgreSqlPlugin.java | 7 ++- .../raptor/legacy/TestRaptorPlugin.java | 1 + .../trino/plugin/redis/TestRedisPlugin.java | 1 + .../plugin/redshift/TestRedshiftPlugin.java | 7 ++- .../TestSingleStoreJdbcConfig.java | 6 ++- .../singlestore/TestSingleStorePlugin.java | 7 ++- .../plugin/sqlserver/TestSqlServerPlugin.java | 7 ++- .../trino/plugin/thrift/TestThriftPlugin.java | 4 +- .../planner/BaseIcebergCostBasedPlanTest.java | 1 + 41 files changed, 302 insertions(+), 72 deletions(-) diff --git a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestTrinoDatabaseMetaData.java b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestTrinoDatabaseMetaData.java index b45dd11edaf4..b4c1b4f06a06 100644 --- a/client/trino-jdbc/src/test/java/io/trino/jdbc/TestTrinoDatabaseMetaData.java +++ b/client/trino-jdbc/src/test/java/io/trino/jdbc/TestTrinoDatabaseMetaData.java @@ -122,6 +122,7 @@ public void setupServer() .put("hive.metastore", "file") .put("hive.metastore.catalog.dir", server.getBaseDataDir().resolve("hive").toAbsolutePath().toString()) .put("hive.security", "sql-standard") + .put("bootstrap.quiet", "true") .buildOrThrow()); countingMockConnector = new CountingMockConnector(); diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/BaseFileBasedConnectorAccessControlTest.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/BaseFileBasedConnectorAccessControlTest.java index 75d92892b4a9..1e2c0cabd4a9 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/BaseFileBasedConnectorAccessControlTest.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/BaseFileBasedConnectorAccessControlTest.java @@ -811,6 +811,7 @@ protected ConnectorAccessControl createAccessControl(Map configP Injector injector = bootstrap .doNotInitializeLogging() + .quiet() .setRequiredConfigurationProperties(configProperties) .initialize(); diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedSystemAccessControl.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedSystemAccessControl.java index 405ac1624ca1..e70d6e206f33 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedSystemAccessControl.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/security/TestFileBasedSystemAccessControl.java @@ -25,7 +25,10 @@ public class TestFileBasedSystemAccessControl @Override protected SystemAccessControl newFileBasedSystemAccessControl(File configFile, Map properties) { - return newFileBasedSystemAccessControl(ImmutableMap.builder().putAll(properties).put("security.config-file", - configFile.getAbsolutePath()).buildOrThrow()); + return newFileBasedSystemAccessControl(ImmutableMap.builder() + .putAll(properties) + .put("security.config-file", configFile.getAbsolutePath()) + .put("bootstrap.quiet", "true") + .buildOrThrow()); } } diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestingHttpServer.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestingHttpServer.java index 77cba7e0b3cc..47e07a3c19ee 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestingHttpServer.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/util/TestingHttpServer.java @@ -53,6 +53,7 @@ public TestingHttpServer() Injector injector = app .doNotInitializeLogging() + .quiet() .initialize(); lifeCycleManager = injector.getInstance(LifeCycleManager.class); diff --git a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopPlugin.java b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopPlugin.java index b070ba0e176c..09665c2e662f 100644 --- a/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopPlugin.java +++ b/plugin/trino-atop/src/test/java/io/trino/plugin/atop/TestAtopPlugin.java @@ -37,6 +37,11 @@ public void testCreateConnector() ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); Path atopExecutable = Files.createTempFile(null, null); - factory.create("test", ImmutableMap.of("atop.executable-path", atopExecutable.toString()), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "atop.executable-path", atopExecutable.toString(), + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJmxStats.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJmxStats.java index d8c1d4d3ea22..26be008f3309 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJmxStats.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestJmxStats.java @@ -39,7 +39,12 @@ public void testJmxStatsExposure() { Plugin plugin = new JdbcPlugin("base_jdbc", new TestingH2JdbcModule()); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:driver:"), new TestingConnectorContext()); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:driver:", + "bootstrap.quiet", "true"), + new TestingConnectorContext()); MBeanServer mbeanServer = getPlatformMBeanServer(); Set objectNames = mbeanServer.queryNames(new ObjectName("io.trino.plugin.jdbc:*"), null); diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcModule.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcModule.java index 814450973758..34ad771b68d4 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcModule.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestingH2JdbcModule.java @@ -71,7 +71,9 @@ public ConnectionFactory getConnectionFactory(BaseJdbcConfig config, CredentialP public static Map createProperties() { - return ImmutableMap.of("connection-url", createH2ConnectionUrl()); + return ImmutableMap.of( + "connection-url", createH2ConnectionUrl(), + "bootstrap.quiet", "true"); } public static String createH2ConnectionUrl() diff --git a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryPlugin.java b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryPlugin.java index d3bf4f294c8c..85908c42baad 100644 --- a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryPlugin.java +++ b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestBigQueryPlugin.java @@ -35,7 +35,8 @@ public void testCreateConnector() "test", Map.of( "bigquery.project-id", "xxx", - "bigquery.credentials-key", "ewogICAgInR5cGUiOiAic2VydmljZV9hY2NvdW50IiwKICAgICJwcm9qZWN0X2lkIjogInByZXN0b3Rlc3QiLAogICAgInByaXZhdGVfa2V5X2lkIjogIngiLAogICAgInByaXZhdGVfa2V5IjogIi0tLS0tQkVHSU4gUFJJVkFURSBLRVktLS0tLVxuTUlJRXZRSUJBREFOQmdrcWhraUc5dzBCQVFFRkFBU0NCS2N3Z2dTakFnRUFBb0lCQVFDM3E0NkcrdlRtdllmR1xuUEVCcUZST2MwWllEUFE4Z1VRYlEvaWRiYXBQc0s3TUxIZEx1RUdzQkF4SjMyYkdKV2FXV1pKMlZvKzA2Y3E4UlxuM1VZdVJ5RDBvNVk5OTV3d0t5YUVMdjVHTHFxMlpkQ0U2MGNqbE8yeXM4dUg4MVJMQStOME9zUzI0WXAvTmw1V1xuMHl4bkVuaW5VSW5Hb1VteVJ0K1V1aTIxNTQ3WTZFeDFKMGdqVndoNWtBNTJBcG0xVzVjZ3JKUWgwMlZTNUZERlxudEtnWjlKNFUyZVQvM2RNUkFlN0dLaWtseGpMTktjSzJ6T3JuYVpzb0pBTnNrZ0xMdjhPaDJEdlpQbWd1dmtxL1xuUU4yRVRCSXVLRUxCbEN4ZHZkRVp5L2pPcUVmdW1xcWI4VTVqVk4vdit6Q0pZVHREcVRGVWxLRVZDbEVNV3BCUFxu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3MWJiM0lXb2lwc0tHR21LWDlaT1ZvcXh1Z1lwNSt6UHQ1ckpsWER4a1xuSFFnK3YrNjIwT1RkY0V5QXJoVmdkYjRtWTRmYjdXMnZsMXNBcWcwaGZkQllWRVM1WW9mbE85TVFSTDhMNVYyRVxuZTIxamFFdXA4a3liT3Qza2V2NnRwSG13UG5Dbk1BZmlHZkR6eFdWaEFvR0FYa1k5bjNsSDFISDJBUDhzMkNnNVxuN3o3NVhLYWtxWE9CMkNhTWFuOWxJd0FCVzhSam1IKzRiU2VVQ0kwM1hRRExrY1R3T0N3QStrL3FvZldBeW1ldVxudzU4Vzh5cGlWVGpDVDErUzh5VjhYL0htTERVa3VsTnUvY2psYlJPdnJmSlRIL2pNbVhhTEQxeVZlYXlxOFlGZFxubnl6SmpiR1BwdGsvYVRTYk5rQmpvdWM9XG4tLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tXG4iLAogICAgImNsaWVudF9lbWFpbCI6ICJ4IiwKICAgICJjbGllbnRfaWQiOiAieCIsCiAgICAiYXV0aF91cmkiOiAiaHR0cHM6Ly9hY2NvdW50cy5nb29nbGUuY29tL28vb2F1dGgyL2F1dGgiLAogICAgInRva2VuX3VyaSI6ICJodHRwczovL29hdXRoMi5nb29nbGVhcGlzLmNvbS90b2tlbiIsCiAgICAiYXV0aF9wcm92aWRlcl94NTA5X2NlcnRfdXJsIjogImh0dHBzOi8vd3d3Lmdvb2dsZWFwaXMuY29tL29hdXRoMi92MS9jZXJ0cyIsCiAgICAiY2xpZW50X3g1MDlfY2VydF91cmwiOiAiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vcm9ib3QvdjEvbWV0YWRhdGEveDUwOS9wcmVzdG90ZXN0JTQwcHJlc3RvdGVzdC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIKfQo=", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } diff --git a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraConnector.java b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraConnector.java index b77504ebf5dd..1eb5bc82075c 100644 --- a/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraConnector.java +++ b/plugin/trino-cassandra/src/test/java/io/trino/plugin/cassandra/TestCassandraConnector.java @@ -128,7 +128,8 @@ public void setup() "cassandra.contact-points", server.getHost(), "cassandra.load-policy.use-dc-aware", "true", "cassandra.load-policy.dc-aware.local-dc", "datacenter1", - "cassandra.native-protocol-port", Integer.toString(server.getPort())), + "cassandra.native-protocol-port", Integer.toString(server.getPort()), + "bootstrap.quiet", "true"), new TestingConnectorContext()); metadata = connector.getMetadata(SESSION, CassandraTransactionHandle.INSTANCE); diff --git a/plugin/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHousePlugin.java b/plugin/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHousePlugin.java index 9aac64931529..ba6387cd267e 100644 --- a/plugin/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHousePlugin.java +++ b/plugin/trino-clickhouse/src/test/java/io/trino/plugin/clickhouse/TestClickHousePlugin.java @@ -28,6 +28,11 @@ public void testCreateConnector() { Plugin plugin = new ClickHousePlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:clickhouse://test"), new TestingConnectorContext()); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:clickhouse://test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()); } } diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePlugin.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePlugin.java index bbb315209d27..cf64442880cc 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePlugin.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePlugin.java @@ -34,7 +34,12 @@ public class TestDeltaLakePlugin public void testCreateConnector() { ConnectorFactory factory = getConnectorFactory(); - factory.create("test", ImmutableMap.of("hive.metastore.uri", "thrift://foo:1234"), new TestingConnectorContext()) + factory.create( + "test", + ImmutableMap.of( + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), + new TestingConnectorContext()) .shutdown(); } @@ -43,7 +48,12 @@ public void testCreateTestingConnector() { Plugin plugin = new TestingDeltaLakePlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("hive.metastore.uri", "thrift://foo:1234"), new TestingConnectorContext()) + factory.create( + "test", + ImmutableMap.of( + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), + new TestingConnectorContext()) .shutdown(); } @@ -55,7 +65,8 @@ public void testTestingFileMetastore() "test", ImmutableMap.of( "hive.metastore", "file", - "hive.metastore.catalog.dir", "/tmp"), + "hive.metastore.catalog.dir", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -68,7 +79,8 @@ public void testThriftMetastore() "test", ImmutableMap.of( "hive.metastore", "thrift", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); @@ -77,7 +89,8 @@ public void testThriftMetastore() ImmutableMap.of( "hive.metastore", "thrift", "hive.metastore.uri", "thrift://foo:1234", - "delta.hide-non-delta-lake-tables", "true"), + "delta.hide-non-delta-lake-tables", "true", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .isInstanceOf(ApplicationConfigurationException.class) // TODO support delta.hide-non-delta-lake-tables with thrift metastore @@ -92,7 +105,8 @@ public void testGlueMetastore() "test", ImmutableMap.of( "hive.metastore", "glue", - "hive.metastore.glue.region", "us-east-2"), + "hive.metastore.glue.region", "us-east-2", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); @@ -100,7 +114,8 @@ public void testGlueMetastore() "test", ImmutableMap.of( "hive.metastore", "glue", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .isInstanceOf(ApplicationConfigurationException.class) .hasMessageContaining("Error: Configuration property 'hive.metastore.uri' was not used"); @@ -113,7 +128,8 @@ public void testNoCaching() factory.create("test", ImmutableMap.of( "hive.metastore.uri", "thrift://foo:1234", - "delta.metadata.cache-ttl", "0s"), + "delta.metadata.cache-ttl", "0s", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -125,7 +141,8 @@ public void testNoActiveDataFilesCaching() factory.create("test", ImmutableMap.of( "hive.metastore.uri", "thrift://foo:1234", - "delta.metadata.live-files.cache-ttl", "0s"), + "delta.metadata.live-files.cache-ttl", "0s", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -138,7 +155,8 @@ public void testHiveConfigIsNotBound() ImmutableMap.of( "hive.metastore.uri", "thrift://foo:1234", // Try setting any property provided by HiveConfig class - HiveConfig.CONFIGURATION_HIVE_PARTITION_PROJECTION_ENABLED, "true"), + HiveConfig.CONFIGURATION_HIVE_PARTITION_PROJECTION_ENABLED, "true", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .hasMessageContaining("Error: Configuration property 'hive.partition-projection-enabled' was not used"); } @@ -152,6 +170,7 @@ public void testReadOnlyAllAccessControl() ImmutableMap.builder() .put("hive.metastore.uri", "thrift://foo:1234") .put("delta.security", "read-only") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -166,6 +185,7 @@ public void testSystemAccessControl() ImmutableMap.builder() .put("hive.metastore.uri", "thrift://foo:1234") .put("delta.security", "system") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertThatThrownBy(connector::getAccessControl).isInstanceOf(UnsupportedOperationException.class); @@ -187,6 +207,7 @@ public void testFileBasedAccessControl() .put("hive.metastore.uri", "thrift://foo:1234") .put("delta.security", "file") .put("security.config-file", tempFile.getAbsolutePath()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); diff --git a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidJdbcPlugin.java b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidJdbcPlugin.java index 72e4dc9bebab..0450592eee17 100644 --- a/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidJdbcPlugin.java +++ b/plugin/trino-druid/src/test/java/io/trino/plugin/druid/TestDruidJdbcPlugin.java @@ -28,6 +28,11 @@ public void testCreateConnector() { Plugin plugin = new DruidJdbcPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:druid:test"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:druid:test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestSheetsPlugin.java b/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestSheetsPlugin.java index f03fe410009b..a75f89d771ff 100644 --- a/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestSheetsPlugin.java +++ b/plugin/trino-google-sheets/src/test/java/io/trino/plugin/google/sheets/TestSheetsPlugin.java @@ -53,7 +53,10 @@ public void testCreateConnector() { Plugin plugin = new SheetsPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - ImmutableMap.Builder propertiesMap = ImmutableMap.builder().put("gsheets.credentials-path", getTestCredentialsPath()).put("gsheets.metadata-sheet-id", TEST_METADATA_SHEET_ID); + ImmutableMap.Builder propertiesMap = ImmutableMap.builder() + .put("gsheets.credentials-path", getTestCredentialsPath()) + .put("gsheets.metadata-sheet-id", TEST_METADATA_SHEET_ID) + .put("bootstrap.quiet", "true"); Connector connector = factory.create(GOOGLE_SHEETS, propertiesMap.buildOrThrow(), new TestingConnectorContext()); assertThat(connector).isNotNull(); connector.shutdown(); diff --git a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHivePlugin.java b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHivePlugin.java index b02ae6e60bba..6957c6d2a309 100644 --- a/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHivePlugin.java +++ b/plugin/trino-hive-hadoop2/src/test/java/io/trino/plugin/hive/TestHivePlugin.java @@ -75,7 +75,12 @@ public void testCreateConnector() ConnectorFactory factory = getHiveConnectorFactory(); // simplest possible configuration - factory.create("test", ImmutableMap.of("hive.metastore.uri", "thrift://foo:1234"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } @Test @@ -86,7 +91,8 @@ public void testTestingFileMetastore() "test", ImmutableMap.of( "hive.metastore", "file", - "hive.metastore.catalog.dir", "/tmp"), + "hive.metastore.catalog.dir", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -100,7 +106,8 @@ public void testThriftMetastore() "test", ImmutableMap.of( "hive.metastore", "thrift", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -114,7 +121,8 @@ public void testGlueMetastore() "test", ImmutableMap.of( "hive.metastore", "glue", - "hive.metastore.glue.region", "us-east-2"), + "hive.metastore.glue.region", "us-east-2", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); @@ -122,7 +130,8 @@ public void testGlueMetastore() "test", ImmutableMap.of( "hive.metastore", "glue", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .hasMessageContaining("Error: Configuration property 'hive.metastore.uri' was not used"); } @@ -137,7 +146,8 @@ public void testRecordingMetastore() ImmutableMap.of( "hive.metastore", "thrift", "hive.metastore.uri", "thrift://foo:1234", - "hive.metastore-recording-path", "/tmp"), + "hive.metastore-recording-path", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); @@ -146,7 +156,8 @@ public void testRecordingMetastore() ImmutableMap.of( "hive.metastore", "glue", "hive.metastore.glue.region", "us-east-2", - "hive.metastore-recording-path", "/tmp"), + "hive.metastore-recording-path", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -165,6 +176,7 @@ public void testS3SecurityMappingAndHiveCachingMutuallyExclusive() .put("hive.cache.enabled", "true") .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.cache.location", tempDirectory.toString()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasMessageContaining("S3 security mapping is not compatible with Hive caching"); @@ -182,6 +194,7 @@ public void testGcsAccessTokenAndHiveCachingMutuallyExclusive() .put("hive.cache.enabled", "true") .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.cache.location", tempDirectory.toString()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasMessageContaining("Use of GCS access token is not compatible with Hive caching"); @@ -198,6 +211,7 @@ public void testImmutablePartitionsAndInsertOverwriteMutuallyExclusive() .put("hive.insert-existing-partitions-behavior", "APPEND") .put("hive.immutable-partitions", "true") .put("hive.metastore.uri", "thrift://foo:1234") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasMessageContaining("insert-existing-partitions-behavior cannot be APPEND when immutable-partitions is true"); @@ -213,6 +227,7 @@ public void testInsertOverwriteIsSetToErrorWhenImmutablePartitionsIsTrue() ImmutableMap.builder() .put("hive.immutable-partitions", "true") .put("hive.metastore.uri", "thrift://foo:1234") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertThat(getDefaultValueInsertExistingPartitionsBehavior(connector)).isEqualTo(ERROR); @@ -226,7 +241,9 @@ public void testInsertOverwriteIsSetToAppendWhenImmutablePartitionsIsFalseByDefa Connector connector = connectorFactory.create( "test", - ImmutableMap.of("hive.metastore.uri", "thrift://foo:1234"), + ImmutableMap.of( + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext()); assertThat(getDefaultValueInsertExistingPartitionsBehavior(connector)).isEqualTo(APPEND); connector.shutdown(); @@ -252,6 +269,7 @@ public void testHdfsImpersonationAndHiveCachingMutuallyExclusive() .put("hive.cache.enabled", "true") .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.cache.location", tempDirectory.toString()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasMessageContaining("HDFS impersonation is not compatible with Hive caching"); @@ -268,6 +286,7 @@ public void testRubixCache() .put("hive.cache.enabled", "true") .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.cache.location", tempDirectory.toString()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -285,6 +304,7 @@ public void testRubixCacheWithNonExistingCacheDirectory() .put("hive.cache.start-server-on-coordinator", "true") .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.cache.location", "/tmp/non/existing/directory") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasRootCauseMessage("None of the cache parent directories exists"); @@ -295,6 +315,7 @@ public void testRubixCacheWithNonExistingCacheDirectory() .put("hive.cache.enabled", "true") .put("hive.cache.start-server-on-coordinator", "true") .put("hive.metastore.uri", "thrift://foo:1234") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasRootCauseMessage("caching directories were not provided"); @@ -305,6 +326,7 @@ public void testRubixCacheWithNonExistingCacheDirectory() ImmutableMap.builder() .put("hive.cache.enabled", "true") .put("hive.metastore.uri", "thrift://foo:1234") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -320,6 +342,7 @@ public void testAllowAllAccessControl() ImmutableMap.builder() .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.security", "allow-all") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -335,6 +358,7 @@ public void testReadOnlyAllAccessControl() ImmutableMap.builder() .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.security", "read-only") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -355,6 +379,7 @@ public void testFileBasedAccessControl() .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.security", "file") .put("security.config-file", tempFile.getAbsolutePath()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -370,6 +395,7 @@ public void testSystemAccessControl() ImmutableMap.builder() .put("hive.metastore.uri", "thrift://foo:1234") .put("hive.security", "system") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertThatThrownBy(connector::getAccessControl).isInstanceOf(UnsupportedOperationException.class); diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorFactory.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorFactory.java index 4e0c4b71efdf..a5de8bb83b27 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorFactory.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestHiveConnectorFactory.java @@ -47,7 +47,9 @@ public void testGetClient() private static void assertCreateConnector(String metastoreUri) { - Map config = ImmutableMap.of("hive.metastore.uri", metastoreUri); + Map config = ImmutableMap.of( + "bootstrap.quiet", "true", + "hive.metastore.uri", metastoreUri); Connector connector = new HiveConnectorFactory().create("hive-test", config, new TestingConnectorContext()); ConnectorTransactionHandle transaction = connector.beginTransaction(READ_UNCOMMITTED, true, true); diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestingHiveConnectorFactory.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestingHiveConnectorFactory.java index 086472941d78..ae78ec5fc4a5 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestingHiveConnectorFactory.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestingHiveConnectorFactory.java @@ -13,6 +13,7 @@ */ package io.trino.plugin.hive; +import com.google.common.collect.ImmutableMap; import com.google.inject.Module; import io.opentelemetry.api.OpenTelemetry; import io.trino.plugin.hive.fs.DirectoryLister; @@ -62,6 +63,17 @@ public String getName() @Override public Connector create(String catalogName, Map config, ConnectorContext context) { - return createConnector(catalogName, config, context, module, metastore, Optional.empty(), openTelemetry, directoryLister); + return createConnector( + catalogName, + ImmutableMap.builder() + .putAll(config) + .put("bootstrap.quiet", "true") + .buildOrThrow(), + context, + module, + metastore, + Optional.empty(), + openTelemetry, + directoryLister); } } diff --git a/plugin/trino-hudi/src/test/java/io/trino/plugin/hudi/TestHudiConnectorFactory.java b/plugin/trino-hudi/src/test/java/io/trino/plugin/hudi/TestHudiConnectorFactory.java index 923256be5c37..93fd1984b38a 100644 --- a/plugin/trino-hudi/src/test/java/io/trino/plugin/hudi/TestHudiConnectorFactory.java +++ b/plugin/trino-hudi/src/test/java/io/trino/plugin/hudi/TestHudiConnectorFactory.java @@ -48,7 +48,9 @@ public void testCreateConnector() private static void assertCreateConnector(String metastoreUri) { - Map config = ImmutableMap.of("hive.metastore.uri", metastoreUri); + Map config = ImmutableMap.of( + "hive.metastore.uri", metastoreUri, + "bootstrap.quiet", "true"); ConnectorFactory factory = new HudiConnectorFactory(); Connector connector = factory.create("test", config, new TestingConnectorContext()); diff --git a/plugin/trino-hudi/src/test/java/io/trino/plugin/hudi/TestHudiPlugin.java b/plugin/trino-hudi/src/test/java/io/trino/plugin/hudi/TestHudiPlugin.java index a6cbe73b4c33..71ec2e585916 100644 --- a/plugin/trino-hudi/src/test/java/io/trino/plugin/hudi/TestHudiPlugin.java +++ b/plugin/trino-hudi/src/test/java/io/trino/plugin/hudi/TestHudiPlugin.java @@ -33,7 +33,12 @@ public class TestHudiPlugin public void testCreateConnector() { ConnectorFactory factory = getConnectorFactory(); - factory.create("test", Map.of("hive.metastore.uri", "thrift://foo:1234"), new TestingConnectorContext()) + factory.create( + "test", + Map.of( + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), + new TestingConnectorContext()) .shutdown(); } @@ -42,7 +47,12 @@ public void testCreateTestingConnector() { Plugin plugin = new TestingHudiPlugin(Optional.empty()); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", Map.of("hive.metastore.uri", "thrift://foo:1234"), new TestingConnectorContext()) + factory.create( + "test", + Map.of( + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), + new TestingConnectorContext()) .shutdown(); } @@ -54,7 +64,8 @@ public void testTestingFileMetastore() "test", ImmutableMap.of( "hive.metastore", "file", - "hive.metastore.catalog.dir", "/tmp"), + "hive.metastore.catalog.dir", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -67,7 +78,8 @@ public void testThriftMetastore() "test", Map.of( "hive.metastore", "thrift", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -80,7 +92,8 @@ public void testGlueMetastore() "test", Map.of( "hive.metastore", "glue", - "hive.metastore.glue.region", "us-east-2"), + "hive.metastore.glue.region", "us-east-2", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); @@ -88,7 +101,8 @@ public void testGlueMetastore() "test", Map.of( "hive.metastore", "glue", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .isInstanceOf(ApplicationConfigurationException.class) .hasMessageContaining("Error: Configuration property 'hive.metastore.uri' was not used"); @@ -102,7 +116,8 @@ public void testHiveConfigIsNotBound() Map.of( "hive.metastore.uri", "thrift://foo:1234", // Try setting any property provided by HiveConfig class - HiveConfig.CONFIGURATION_HIVE_PARTITION_PROJECTION_ENABLED, "true"), + HiveConfig.CONFIGURATION_HIVE_PARTITION_PROJECTION_ENABLED, "true", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .hasMessageContaining("Error: Configuration property 'hive.partition-projection-enabled' was not used"); } diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConnectorFactory.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConnectorFactory.java index dc0b740b30a9..ced9c6a48299 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConnectorFactory.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergConnectorFactory.java @@ -27,7 +27,9 @@ public class TestIcebergConnectorFactory @Test public void testBasicConfig() { - Map config = ImmutableMap.of("hive.metastore.uri", "thrift://localhost:1234"); + Map config = ImmutableMap.of( + "hive.metastore.uri", "thrift://localhost:1234", + "bootstrap.quiet", "true"); createConnector(config); } @@ -37,6 +39,7 @@ public void testCachingHiveMetastore() Map config = ImmutableMap.builder() .put("hive.metastore.uri", "thrift://localhost:1234") .put("hive.metastore-cache-ttl", "5m") + .put("bootstrap.quiet", "true") .buildOrThrow(); assertThatThrownBy(() -> createConnector(config)) .hasMessageContaining("Hive metastore caching must not be enabled for Iceberg"); diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergPlugin.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergPlugin.java index 5fcc3c7a0751..d33c5eaea614 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergPlugin.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergPlugin.java @@ -35,7 +35,12 @@ public void testCreateConnector() { ConnectorFactory factory = getConnectorFactory(); // simplest possible configuration - factory.create("test", Map.of("hive.metastore.uri", "thrift://foo:1234"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + Map.of( + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } @Test @@ -46,7 +51,8 @@ public void testTestingFileMetastore() "test", Map.of( "iceberg.catalog.type", "TESTING_FILE_METASTORE", - "hive.metastore.catalog.dir", "/tmp"), + "hive.metastore.catalog.dir", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -60,7 +66,8 @@ public void testThriftMetastore() "test", Map.of( "iceberg.catalog.type", "HIVE_METASTORE", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); @@ -69,7 +76,8 @@ public void testThriftMetastore() "test", Map.of( "hive.metastore.uri", "thrift://foo:1234", - "hive.metastore.glue.region", "us-east"), + "hive.metastore.glue.region", "us-east", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .hasMessageContaining("Configuration property 'hive.metastore.glue.region' was not used"); } @@ -83,7 +91,8 @@ public void testHiveMetastoreRejected() "test", Map.of( "hive.metastore", "thrift", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .hasMessageContaining("Error: Configuration property 'hive.metastore' was not used"); } @@ -97,7 +106,8 @@ public void testGlueMetastore() "test", Map.of( "iceberg.catalog.type", "glue", - "hive.metastore.glue.region", "us-east-1"), + "hive.metastore.glue.region", "us-east-1", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); @@ -105,7 +115,8 @@ public void testGlueMetastore() "test", Map.of( "iceberg.catalog.type", "glue", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .hasMessageContaining("Error: Configuration property 'hive.metastore.uri' was not used"); @@ -114,7 +125,8 @@ public void testGlueMetastore() Map.of( "iceberg.catalog.type", "glue", "hive.metastore.glue.catalogid", "123", - "hive.metastore.glue.region", "us-east-1"), + "hive.metastore.glue.region", "us-east-1", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -130,7 +142,8 @@ public void testRecordingMetastore() Map.of( "iceberg.catalog.type", "HIVE_METASTORE", "hive.metastore.uri", "thrift://foo:1234", - "hive.metastore-recording-path", "/tmp"), + "hive.metastore-recording-path", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); @@ -140,7 +153,8 @@ public void testRecordingMetastore() Map.of( "iceberg.catalog.type", "glue", "hive.metastore.glue.region", "us-east-2", - "hive.metastore-recording-path", "/tmp"), + "hive.metastore-recording-path", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .hasMessageContaining("Configuration property 'hive.metastore-recording-path' was not used"); @@ -150,7 +164,8 @@ public void testRecordingMetastore() Map.of( "iceberg.catalog.type", "nessie", "hive.metastore.nessie.region", "us-east-2", - "hive.metastore-recording-path", "/tmp"), + "hive.metastore-recording-path", "/tmp", + "bootstrap.quiet", "true"), new TestingConnectorContext())) .hasMessageContaining("Configuration property 'hive.metastore-recording-path' was not used"); } @@ -166,6 +181,7 @@ public void testAllowAllAccessControl() .put("iceberg.catalog.type", "HIVE_METASTORE") .put("hive.metastore.uri", "thrift://foo:1234") .put("iceberg.security", "allow-all") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -182,6 +198,7 @@ public void testReadOnlyAllAccessControl() .put("iceberg.catalog.type", "HIVE_METASTORE") .put("hive.metastore.uri", "thrift://foo:1234") .put("iceberg.security", "read-only") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -198,6 +215,7 @@ public void testSystemAccessControl() .put("iceberg.catalog.type", "HIVE_METASTORE") .put("hive.metastore.uri", "thrift://foo:1234") .put("iceberg.security", "system") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertThatThrownBy(connector::getAccessControl).isInstanceOf(UnsupportedOperationException.class); @@ -220,6 +238,7 @@ public void testFileBasedAccessControl() .put("hive.metastore.uri", "thrift://foo:1234") .put("iceberg.security", "file") .put("security.config-file", tempFile.getAbsolutePath()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()) .shutdown(); @@ -235,7 +254,8 @@ public void testIcebergPluginFailsWhenIncorrectPropertyProvided() Map.of( "iceberg.catalog.type", "HIVE_METASTORE", HIVE_VIEWS_ENABLED, "true", - "hive.metastore.uri", "thrift://foo:1234"), + "hive.metastore.uri", "thrift://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown()) .isInstanceOf(ApplicationConfigurationException.class) @@ -251,7 +271,8 @@ public void testRestCatalog() "test", Map.of( "iceberg.catalog.type", "rest", - "iceberg.rest-catalog.uri", "https://foo:1234"), + "iceberg.rest-catalog.uri", "https://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -268,7 +289,8 @@ public void testJdbcCatalog() "iceberg.jdbc-catalog.driver-class", "org.postgresql.Driver", "iceberg.jdbc-catalog.connection-url", "jdbc:postgresql://localhost:5432/test", "iceberg.jdbc-catalog.catalog-name", "test", - "iceberg.jdbc-catalog.default-warehouse-dir", "s3://bucket"), + "iceberg.jdbc-catalog.default-warehouse-dir", "s3://bucket", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } @@ -283,7 +305,8 @@ public void testNessieCatalog() Map.of( "iceberg.catalog.type", "nessie", "iceberg.nessie-catalog.default-warehouse-dir", "/tmp", - "iceberg.nessie-catalog.uri", "http://foo:1234"), + "iceberg.nessie-catalog.uri", "http://foo:1234", + "bootstrap.quiet", "true"), new TestingConnectorContext()) .shutdown(); } diff --git a/plugin/trino-ignite/src/test/java/io/trino/plugin/ignite/TestIgnitePlugin.java b/plugin/trino-ignite/src/test/java/io/trino/plugin/ignite/TestIgnitePlugin.java index e97005439769..c345d8671c52 100644 --- a/plugin/trino-ignite/src/test/java/io/trino/plugin/ignite/TestIgnitePlugin.java +++ b/plugin/trino-ignite/src/test/java/io/trino/plugin/ignite/TestIgnitePlugin.java @@ -28,6 +28,11 @@ public void testCreateConnector() { Plugin plugin = new IgnitePlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:ignite:thin://localhost"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:ignite:thin://localhost", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplitManager.java b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplitManager.java index 072cf20042e6..2f8497152d29 100644 --- a/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplitManager.java +++ b/plugin/trino-jmx/src/test/java/io/trino/plugin/jmx/TestJmxSplitManager.java @@ -79,7 +79,8 @@ public class TestJmxSplitManager .create(CONNECTOR_ID, ImmutableMap.of( "jmx.dump-tables", TEST_BEANS, "jmx.dump-period", format("%dms", JMX_STATS_DUMP.toMillis()), - "jmx.max-entries", "1000"), + "jmx.max-entries", "1000", + "bootstrap.quiet", "true"), new ConnectorContext() { @Override diff --git a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaPlugin.java b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaPlugin.java index 78490aaf99bc..cdd40c58607a 100644 --- a/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaPlugin.java +++ b/plugin/trino-kafka/src/test/java/io/trino/plugin/kafka/TestKafkaPlugin.java @@ -49,6 +49,7 @@ public void testSpinup() .put("kafka.table-names", "test") .put("kafka.nodes", "localhost:9092") .put("kafka.config.resources", resource.toString()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertNotNull(connector); @@ -85,6 +86,7 @@ public void testSslSpinup() .put("kafka.ssl.truststore.location", truststorePath.toString()) .put("kafka.ssl.truststore.password", "truststore-password") .put("kafka.ssl.endpoint-identification-algorithm", "https") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertNotNull(connector); @@ -116,6 +118,7 @@ public void testSslKeystoreMissingFileSpindown() .put("kafka.ssl.truststore.location", truststorePath.toString()) .put("kafka.ssl.truststore.password", "truststore-password") .put("kafka.ssl.endpoint-identification-algorithm", "https") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasMessageContaining("Error: Invalid configuration property kafka.ssl.keystore.location: file does not exist: /not/a/real/path"); @@ -146,6 +149,7 @@ public void testSslTruststoreMissingFileSpindown() .put("kafka.ssl.truststore.location", "/not/a/real/path") .put("kafka.ssl.truststore.password", "truststore-password") .put("kafka.ssl.endpoint-identification-algorithm", "https") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasMessageContaining("Error: Invalid configuration property kafka.ssl.truststore.location: file does not exist: /not/a/real/path"); @@ -166,6 +170,7 @@ public void testResourceConfigMissingFileSpindown() .put("kafka.nodes", "localhost:9092") .put("kafka.security-protocol", "PLAINTEXT") .put("kafka.config.resources", "/not/a/real/path/1,/not/a/real/path/2") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext())) .hasMessageContainingAll("Error: Invalid configuration property", ": file does not exist: /not/a/real/path/1", ": file does not exist: /not/a/real/path/2"); @@ -190,6 +195,7 @@ public void testConfigResourceSpinup() .put("kafka.table-names", "test") .put("kafka.nodes", "localhost:9092") .put("kafka.config.resources", nativeKafkaResourcePath.toString()) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertNotNull(connector); diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisPlugin.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisPlugin.java index bafe67ffa92a..1ca455ff46c8 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisPlugin.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisPlugin.java @@ -49,6 +49,7 @@ public void testCreateConnector() .put("kinesis.hide-internal-columns", "false") .put("kinesis.access-key", TestUtils.noneToBlank(accessKey)) .put("kinesis.secret-key", TestUtils.noneToBlank(secretKey)) + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertNotNull(c); diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisTableDescriptionSupplier.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisTableDescriptionSupplier.java index 2edd09afc8ca..27a28bfe4a42 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisTableDescriptionSupplier.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/TestKinesisTableDescriptionSupplier.java @@ -51,6 +51,7 @@ public void start() .put("kinesis.table-description-location", "etc/kinesis") .put("kinesis.default-schema", "kinesis") .put("kinesis.hide-internal-columns", "true") + .put("bootstrap.quiet", "true") .buildOrThrow(); KinesisTestClientManager kinesisTestClientManager = new KinesisTestClientManager(); diff --git a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/s3config/TestS3TableConfigClient.java b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/s3config/TestS3TableConfigClient.java index cb2c19cc3444..656d97238767 100644 --- a/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/s3config/TestS3TableConfigClient.java +++ b/plugin/trino-kinesis/src/test/java/io/trino/plugin/kinesis/s3config/TestS3TableConfigClient.java @@ -94,6 +94,7 @@ public void testTableReading(String tableDescriptionS3, String accessKey, String .put("kinesis.hide-internal-columns", "false") .put("kinesis.access-key", TestUtils.noneToBlank(accessKey)) .put("kinesis.secret-key", TestUtils.noneToBlank(secretKey)) + .put("bootstrap.quiet", "true") .buildOrThrow(); KinesisPlugin kinesisPlugin = new KinesisPlugin(); diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduPlugin.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduPlugin.java index e1163a4ac682..3344a62ab157 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduPlugin.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduPlugin.java @@ -28,6 +28,11 @@ public void testCreateConnector() { Plugin plugin = new KuduPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("kudu.client.master-addresses", "localhost:7051"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "kudu.client.master-addresses", "localhost:7051", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-mariadb/src/test/java/io/trino/plugin/mariadb/TestMariaDbPlugin.java b/plugin/trino-mariadb/src/test/java/io/trino/plugin/mariadb/TestMariaDbPlugin.java index ed8b48987e0d..6ed113f665fb 100644 --- a/plugin/trino-mariadb/src/test/java/io/trino/plugin/mariadb/TestMariaDbPlugin.java +++ b/plugin/trino-mariadb/src/test/java/io/trino/plugin/mariadb/TestMariaDbPlugin.java @@ -29,12 +29,27 @@ public void testCreateConnector() { Plugin plugin = new MariaDbPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:mariadb://test"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:mariadb://test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); - assertThatThrownBy(() -> factory.create("test", ImmutableMap.of("connection-url", "test"), new TestingConnectorContext())) + assertThatThrownBy(() -> factory.create( + "test", + ImmutableMap.of( + "connection-url", "test", + "bootstrap.quiet", "true"), + new TestingConnectorContext())) .hasMessageContaining("Invalid JDBC URL for MariaDB connector"); - assertThatThrownBy(() -> factory.create("test", ImmutableMap.of("connection-url", "jdbc:mariadb://test/abc"), new TestingConnectorContext())) + assertThatThrownBy(() -> factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:mariadb://test/abc", + "bootstrap.quiet", "true"), + new TestingConnectorContext())) .hasMessageContaining("Database (catalog) must not be specified in JDBC URL for MariaDB connector"); } } diff --git a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoPlugin.java b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoPlugin.java index 08d13422617e..4da82167001a 100644 --- a/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoPlugin.java +++ b/plugin/trino-mongodb/src/test/java/io/trino/plugin/mongodb/TestMongoPlugin.java @@ -32,7 +32,12 @@ public void testCreateConnector() MongoPlugin plugin = new MongoPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - Connector connector = factory.create("test", ImmutableMap.of("mongodb.connection-url", "mongodb://localhost:27017"), new TestingConnectorContext()); + Connector connector = factory.create( + "test", + ImmutableMap.of( + "mongodb.connection-url", "mongodb://localhost:27017", + "bootstrap.quiet", "true"), + new TestingConnectorContext()); Type type = getOnlyElement(plugin.getTypes()); assertEquals(type, OBJECT_ID); diff --git a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlPlugin.java b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlPlugin.java index 19a3c5457db0..b9b2cb86fd72 100644 --- a/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlPlugin.java +++ b/plugin/trino-mysql/src/test/java/io/trino/plugin/mysql/TestMySqlPlugin.java @@ -30,12 +30,26 @@ public void testCreateConnector() Plugin plugin = new MySqlPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:mysql://test"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", ImmutableMap.of( + "connection-url", "jdbc:mysql://test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); - assertThatThrownBy(() -> factory.create("test", ImmutableMap.of("connection-url", "test"), new TestingConnectorContext())) + assertThatThrownBy(() -> factory.create( + "test", + ImmutableMap.of( + "connection-url", "test", + "bootstrap.quiet", "true"), + new TestingConnectorContext())) .hasMessageContaining("Invalid JDBC URL for MySQL connector"); - assertThatThrownBy(() -> factory.create("test", ImmutableMap.of("connection-url", "jdbc:mysql://test/abc"), new TestingConnectorContext())) + assertThatThrownBy(() -> factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:mysql://test/abc", + "bootstrap.quiet", "true"), + new TestingConnectorContext())) .hasMessageContaining("Database (catalog) must not be specified in JDBC URL for MySQL connector"); } } diff --git a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePlugin.java b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePlugin.java index b76aba6744bf..9cab94e3ad0d 100644 --- a/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePlugin.java +++ b/plugin/trino-oracle/src/test/java/io/trino/plugin/oracle/TestOraclePlugin.java @@ -28,6 +28,11 @@ public void testCreateConnector() { Plugin plugin = new OraclePlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:oracle:thin//test"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:oracle:thin//test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-phoenix5/src/test/java/io/trino/plugin/phoenix5/TestPhoenixPlugin.java b/plugin/trino-phoenix5/src/test/java/io/trino/plugin/phoenix5/TestPhoenixPlugin.java index 274fa7cb42fb..8b3a6479dd2d 100644 --- a/plugin/trino-phoenix5/src/test/java/io/trino/plugin/phoenix5/TestPhoenixPlugin.java +++ b/plugin/trino-phoenix5/src/test/java/io/trino/plugin/phoenix5/TestPhoenixPlugin.java @@ -28,7 +28,12 @@ public void testCreateConnector() { Plugin plugin = new PhoenixPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("phoenix.connection-url", "jdbc:phoenix:test"), new TestingConnectorContext()) + factory.create( + "test", + ImmutableMap.of( + "phoenix.connection-url", "jdbc:phoenix:test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()) .shutdown(); } } diff --git a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlPlugin.java b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlPlugin.java index b1e42e783167..35a283207cff 100644 --- a/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlPlugin.java +++ b/plugin/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlPlugin.java @@ -28,6 +28,11 @@ public void testCreateConnector() { Plugin plugin = new PostgreSqlPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:postgresql:test"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:postgresql:test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorPlugin.java b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorPlugin.java index 3db165638310..b713617f8627 100644 --- a/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorPlugin.java +++ b/plugin/trino-raptor-legacy/src/test/java/io/trino/plugin/raptor/legacy/TestRaptorPlugin.java @@ -44,6 +44,7 @@ public void testPlugin() .put("metadata.db.type", "h2") .put("metadata.db.filename", tmpDir.getAbsolutePath()) .put("storage.data-directory", tmpDir.getAbsolutePath()) + .put("bootstrap.quiet", "true") .buildOrThrow(); factory.create("test", config, new TestingConnectorContext()).shutdown(); diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisPlugin.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisPlugin.java index 1ca0df8aac7b..9487abe4678d 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisPlugin.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestRedisPlugin.java @@ -38,6 +38,7 @@ public void testStartup() ImmutableMap.builder() .put("redis.table-names", "test") .put("redis.nodes", "localhost:6379") + .put("bootstrap.quiet", "true") .buildOrThrow(), new TestingConnectorContext()); assertNotNull(connector); diff --git a/plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestRedshiftPlugin.java b/plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestRedshiftPlugin.java index a1d9b6ab73b9..9d4fdaad3e80 100644 --- a/plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestRedshiftPlugin.java +++ b/plugin/trino-redshift/src/test/java/io/trino/plugin/redshift/TestRedshiftPlugin.java @@ -28,6 +28,11 @@ public void testCreateConnector() { Plugin plugin = new RedshiftPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:redshift:test"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:redshift:test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-singlestore/src/test/java/io/trino/plugin/singlestore/TestSingleStoreJdbcConfig.java b/plugin/trino-singlestore/src/test/java/io/trino/plugin/singlestore/TestSingleStoreJdbcConfig.java index 3ecf9da6eb10..8f5717189a01 100644 --- a/plugin/trino-singlestore/src/test/java/io/trino/plugin/singlestore/TestSingleStoreJdbcConfig.java +++ b/plugin/trino-singlestore/src/test/java/io/trino/plugin/singlestore/TestSingleStoreJdbcConfig.java @@ -37,7 +37,11 @@ public void testCreateConnectorLegacyUrl() .filter(connectorFactory -> connectorFactory.getName().equals("singlestore")) .collect(toOptional()) .orElseThrow(); - assertThatThrownBy(() -> factory.create("test", ImmutableMap.of("connection-url", "jdbc:mariadb:test"), new TestingConnectorContext())) + assertThatThrownBy(() -> factory.create( + "test", ImmutableMap.of( + "connection-url", "jdbc:mariadb:test", + "bootstrap.quiet", "true"), + new TestingConnectorContext())) .isInstanceOf(ApplicationConfigurationException.class) .hasMessageContaining(DRIVER_PROTOCOL_ERROR); } diff --git a/plugin/trino-singlestore/src/test/java/io/trino/plugin/singlestore/TestSingleStorePlugin.java b/plugin/trino-singlestore/src/test/java/io/trino/plugin/singlestore/TestSingleStorePlugin.java index fc440831e949..47a5ac8f45c7 100644 --- a/plugin/trino-singlestore/src/test/java/io/trino/plugin/singlestore/TestSingleStorePlugin.java +++ b/plugin/trino-singlestore/src/test/java/io/trino/plugin/singlestore/TestSingleStorePlugin.java @@ -32,6 +32,11 @@ public void testCreateConnector() .filter(connectorFactory -> connectorFactory.getName().equals("singlestore")) .collect(toOptional()) .orElseThrow(); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:singlestore://test"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:singlestore://test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerPlugin.java b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerPlugin.java index 6d68ab83e9da..e972712d56a5 100644 --- a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerPlugin.java +++ b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/TestSqlServerPlugin.java @@ -28,6 +28,11 @@ public void testCreateConnector() { Plugin plugin = new SqlServerPlugin(); ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); - factory.create("test", ImmutableMap.of("connection-url", "jdbc:sqlserver:test"), new TestingConnectorContext()).shutdown(); + factory.create( + "test", + ImmutableMap.of( + "connection-url", "jdbc:sqlserver:test", + "bootstrap.quiet", "true"), + new TestingConnectorContext()).shutdown(); } } diff --git a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftPlugin.java b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftPlugin.java index 234c1114cf6a..bf7d106db935 100644 --- a/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftPlugin.java +++ b/plugin/trino-thrift/src/test/java/io/trino/plugin/thrift/TestThriftPlugin.java @@ -35,7 +35,9 @@ public void testPlugin() ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories()); assertInstanceOf(factory, ThriftConnectorFactory.class); - Map config = ImmutableMap.of("trino.thrift.client.addresses", "localhost:7779"); + Map config = ImmutableMap.of( + "trino.thrift.client.addresses", "localhost:7779", + "bootstrap.quiet", "true"); Connector connector = factory.create("test", config, new TestingConnectorContext()); assertNotNull(connector); diff --git a/testing/trino-tests/src/test/java/io/trino/sql/planner/BaseIcebergCostBasedPlanTest.java b/testing/trino-tests/src/test/java/io/trino/sql/planner/BaseIcebergCostBasedPlanTest.java index 756b559bfcfb..c45d687dd611 100644 --- a/testing/trino-tests/src/test/java/io/trino/sql/planner/BaseIcebergCostBasedPlanTest.java +++ b/testing/trino-tests/src/test/java/io/trino/sql/planner/BaseIcebergCostBasedPlanTest.java @@ -121,6 +121,7 @@ protected ConnectorFactory createConnectorFactory() .put("s3.endpoint", minio.getMinioAddress()) .put("s3.path-style-access", "true") .put(EXTENDED_STATISTICS_CONFIG, "true") + .put("bootstrap.quiet", "true") .buildOrThrow(); return new IcebergConnectorFactory()