zabetak commented on code in PR #6321:
URL: https://github.com/apache/hive/pull/6321#discussion_r2815642226


##########
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/dbinstall/rules/DatabaseRule.java:
##########
@@ -19,11 +19,15 @@
 
 import org.apache.hadoop.hive.metastore.tools.schematool.MetastoreSchemaTool;
 import org.junit.rules.ExternalResource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Abstract JUnit TestRule for different RDMBS types.
  */
 public abstract class DatabaseRule extends ExternalResource {
+  private static final Logger LOG = 
LoggerFactory.getLogger(DatabaseRule.class);

Review Comment:
   Not sure if we need extra logs in this hierarchy. Under the hood we are 
using https://testcontainers.com/ and their logging provides already lots of 
info that is already enabled. For instance,  I run `mvn test -Dtest=TestMysql 
-Dtest.groups=""` and found the following in the logs:
   
   ```
   $ grep "INFO" 
target/surefire-reports/org.apache.hadoop.hive.metastore.dbinstall.TestMysql-output.txt
  | grep -A 25 "PullPolicy" | grep -v "http-outgoing" 
   [INFO ] 2026-02-16 16:09:11.114 [main] PullPolicy - Image pull policy will 
be performed by: DefaultPullPolicy()
   [INFO ] 2026-02-16 16:09:11.116 [main] ImageNameSubstitutor - Image name 
substitution will be performed by: DefaultImageNameSubstitutor (composite of 
'ConfigurationFileImageNameSubstitutor' and 'PrefixingImageNameSubstitutor')
   [INFO ] 2026-02-16 16:09:11.121 [main] DockerClientFactory - Testcontainers 
version: 1.21.3
   [INFO ] 2026-02-16 16:09:11.228 [main] DockerClientProviderStrategy - Loaded 
org.testcontainers.dockerclient.UnixSocketClientProviderStrategy from 
~/.testcontainers.properties, will try it first
   [INFO ] 2026-02-16 16:09:11.406 [main] DockerClientProviderStrategy - Found 
Docker environment with local Unix socket (unix:///var/run/docker.sock)
   [INFO ] 2026-02-16 16:09:11.407 [main] DockerClientFactory - Docker host IP 
address is localhost
   [INFO ] 2026-02-16 16:09:11.421 [main] DockerClientFactory - Connected to 
docker: 
   [INFO ] 2026-02-16 16:09:11.454 [main] 0 - Creating container for image: 
testcontainers/ryuk:0.12.0
   [INFO ] 2026-02-16 16:09:11.544 [main] 0 - Container 
testcontainers/ryuk:0.12.0 is starting: 
04080209616f8009919aa66b26e9c7d6a75bb19b2d453c4446973484e257bcd5
   [DEBUG] 2026-02-16 16:09:11.794 [main] WaitingConsumer - STDOUT: 
time=2026-02-16T15:09:11.740Z level=INFO msg=starting connection_timeout=1m0s 
reconnection_timeout=10s request_timeout=10s shutdown_timeout=10m0s 
remove_retries=10 retry_offset=-1s changes_retry_interval=1s port=8080 
verbose=false
   [DEBUG] 2026-02-16 16:09:11.794 [main] WaitingConsumer - STDOUT: 
time=2026-02-16T15:09:11.740Z level=INFO msg="client processing started"
   [DEBUG] 2026-02-16 16:09:11.794 [main] WaitingConsumer - STDOUT: 
time=2026-02-16T15:09:11.740Z level=INFO msg=Started address=[::]:8080
   [INFO ] 2026-02-16 16:09:11.796 [main] 0 - Container 
testcontainers/ryuk:0.12.0 started in PT0.341932338S
   [INFO ] 2026-02-16 16:09:11.799 [main] RyukResourceReaper - Ryuk started - 
will monitor and terminate Testcontainers containers on JVM exit
   [INFO ] 2026-02-16 16:09:11.799 [main] DockerClientFactory - Checking the 
system...
   [INFO ] 2026-02-16 16:09:11.799 [main] DockerClientFactory - ✔︎ Docker 
server version should be at least 1.6.0
   [INFO ] 2026-02-16 16:09:11.802 [main] 3 - Creating container for image: 
mysql:8.4.3
   [INFO ] 2026-02-16 16:09:12.248 [main] 3 - Container mysql:8.4.3 is 
starting: fb6e08dfffed15b4648b47cfa295109837279f2af20e4e0fc4ef047c057ed88e
   [INFO ] 2026-02-16 16:09:12.383 [main] 3 - Waiting for database connection 
to become available at jdbc:mysql://localhost:32769/test using query 'SELECT 1'
   [INFO ] 2026-02-16 16:09:19.474 [main] 3 - Container mysql:8.4.3 started in 
PT7.672547648S
   [INFO ] 2026-02-16 16:09:19.474 [main] 3 - Container is started (JDBC URL: 
jdbc:mysql://localhost:32769/test)
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to