Skip to content

Commit

Permalink
Turn off bootstrap logging in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martint committed Nov 10, 2023
1 parent 7f39eb3 commit 6c0cd29
Show file tree
Hide file tree
Showing 41 changed files with 302 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ protected ConnectorAccessControl createAccessControl(Map<String, String> configP

Injector injector = bootstrap
.doNotInitializeLogging()
.quiet()
.setRequiredConfigurationProperties(configProperties)
.initialize();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ public class TestFileBasedSystemAccessControl
@Override
protected SystemAccessControl newFileBasedSystemAccessControl(File configFile, Map<String, String> properties)
{
return newFileBasedSystemAccessControl(ImmutableMap.<String, String>builder().putAll(properties).put("security.config-file",
configFile.getAbsolutePath()).buildOrThrow());
return newFileBasedSystemAccessControl(ImmutableMap.<String, String>builder()
.putAll(properties)
.put("security.config-file", configFile.getAbsolutePath())
.put("bootstrap.quiet", "true")
.buildOrThrow());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public TestingHttpServer()

Injector injector = app
.doNotInitializeLogging()
.quiet()
.initialize();

lifeCycleManager = injector.getInstance(LifeCycleManager.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<ObjectName> objectNames = mbeanServer.queryNames(new ObjectName("io.trino.plugin.jdbc:*"), null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public ConnectionFactory getConnectionFactory(BaseJdbcConfig config, CredentialP

public static Map<String, String> createProperties()
{
return ImmutableMap.of("connection-url", createH2ConnectionUrl());
return ImmutableMap.of(
"connection-url", createH2ConnectionUrl(),
"bootstrap.quiet", "true");
}

public static String createH2ConnectionUrl()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public void testCreateConnector()
"test",
Map.of(
"bigquery.project-id", "xxx",
"bigquery.credentials-key", "ewogICAgInR5cGUiOiAic2VydmljZV9hY2NvdW50IiwKICAgICJwcm9qZWN0X2lkIjogInByZXN0b3Rlc3QiLAogICAgInByaXZhdGVfa2V5X2lkIjogIngiLAogICAgInByaXZhdGVfa2V5IjogIi0tLS0tQkVHSU4gUFJJVkFURSBLRVktLS0tLVxuTUlJRXZRSUJBREFOQmdrcWhraUc5dzBCQVFFRkFBU0NCS2N3Z2dTakFnRUFBb0lCQVFDM3E0NkcrdlRtdllmR1xuUEVCcUZST2MwWllEUFE4Z1VRYlEvaWRiYXBQc0s3TUxIZEx1RUdzQkF4SjMyYkdKV2FXV1pKMlZvKzA2Y3E4UlxuM1VZdVJ5RDBvNVk5OTV3d0t5YUVMdjVHTHFxMlpkQ0U2MGNqbE8yeX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vb2dsZWFwaXMuY29tL29hdXRoMi92MS9jZXJ0cyIsCiAgICAiY2xpZW50X3g1MDlfY2VydF91cmwiOiAiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vcm9ib3QvdjEvbWV0YWRhdGEveDUwOS9wcmVzdG90ZXN0JTQwcHJlc3RvdGVzdC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIKfQo=",
"bootstrap.quiet", "true"),
new TestingConnectorContext())
.shutdown();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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();
}

Expand All @@ -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();
}
Expand All @@ -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();

Expand All @@ -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
Expand All @@ -92,15 +105,17 @@ 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();

assertThatThrownBy(() -> factory.create(
"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");
Expand All @@ -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();
}
Expand All @@ -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();
}
Expand All @@ -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");
}
Expand All @@ -152,6 +170,7 @@ public void testReadOnlyAllAccessControl()
ImmutableMap.<String, String>builder()
.put("hive.metastore.uri", "thrift://foo:1234")
.put("delta.security", "read-only")
.put("bootstrap.quiet", "true")
.buildOrThrow(),
new TestingConnectorContext())
.shutdown();
Expand All @@ -166,6 +185,7 @@ public void testSystemAccessControl()
ImmutableMap.<String, String>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);
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ public void testCreateConnector()
{
Plugin plugin = new SheetsPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
ImmutableMap.Builder<String, String> propertiesMap = ImmutableMap.<String, String>builder().put("gsheets.credentials-path", getTestCredentialsPath()).put("gsheets.metadata-sheet-id", TEST_METADATA_SHEET_ID);
ImmutableMap.Builder<String, String> propertiesMap = ImmutableMap.<String, String>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();
Expand Down
Loading

0 comments on commit 6c0cd29

Please sign in to comment.