Silence QueryRunner startup logs in tests#10689
Conversation
38ffd6b to
88d2139
Compare
plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/SqlServerQueryRunner.java
Outdated
Show resolved
Hide resolved
88d2139 to
f25f62c
Compare
testing/trino-testing/src/main/java/io/trino/testing/DistributedQueryRunner.java
Outdated
Show resolved
Hide resolved
e08ff45 to
da81659
Compare
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/H2QueryRunner.java
Outdated
Show resolved
Hide resolved
testing/trino-testing/src/main/java/io/trino/testing/DistributedQueryRunner.java
Outdated
Show resolved
Hide resolved
testing/trino-testing/src/main/java/io/trino/testing/DistributedQueryRunner.java
Outdated
Show resolved
Hide resolved
plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/AccumuloQueryRunner.java
Outdated
Show resolved
Hide resolved
plugin/trino-accumulo/src/test/java/io/trino/plugin/accumulo/AccumuloQueryRunner.java
Outdated
Show resolved
Hide resolved
testing/trino-testing/src/main/java/io/trino/testing/DistributedQueryRunner.java
Outdated
Show resolved
Hide resolved
testing/trino-tests/src/test/java/io/trino/execution/TestConnectorEventListener.java
Outdated
Show resolved
Hide resolved
4b42b87 to
9c6a227
Compare
kokosing
left a comment
There was a problem hiding this comment.
Looks good. What improvement did we get?
There was a problem hiding this comment.
It is not needed. It is already logged.
There was a problem hiding this comment.
This PR disables the regular Bootstrap logger that would log this. This has been added since the DB name is random. It gets logged as:
2022-01-27T11:23:16.813-0600 INFO pool-4-thread-1 io.trino.plugin.sqlserver.SqlServerQueryRunner sqlserver catalog properties: {connection-*** connection-url=jdbc:sqlserver://localhost:49165;database=database_e6cbbe8278d54bd791b508e1ef187d3d;lockTimeout=60000, connection-user=sa, allow-drop-table=true}
You can see that there are no other occurrences of the db name in the CI log, except for failed query error messages.
See the PR description - some jobs go down from thousands to hundreds of log lines. It should also make it a bit easier to search for keywords like "failure" or "failed" since configuration properties won't be matched. |
9c6a227 to
68e04bb
Compare
|
@electrum your requested changes have been applied, PTAL |
68e04bb to
a631fc5
Compare
kokosing
left a comment
There was a problem hiding this comment.
% minor comments. Let me know once it is ready to merge.
...rino-elasticsearch/src/test/java/io/trino/plugin/elasticsearch/ElasticsearchQueryRunner.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/IcebergQueryRunner.java
Outdated
Show resolved
Hide resolved
fb5d613 to
5f5370f
Compare
5f5370f to
6a9aa57
Compare
Silence QueryRunner startup logs to make it easier to browse logs in case of a failure. For example, the output of the
TestCachingHiveMetastoreWithQueryRunnertest fromtrino-hive-hadoop2module goes down from 2348 to 172 lines. Silenced info should be repetitive across different CI runs and not convey information specific to tests. This includes non-default server configuration properties, which are passed explicitly in the QueryRunner builder.Silenced logger examples:
org.glassfish.jersey.internal.inject.Providersandorg.glassfish.jersey.internal.Errors:org.eclipse.jetty.server:io.airlift.bootstrap,io.trino.server.PluginManager:Bootstrap:Previous failed attempts to reduce amount of logs: