From c2c95097247575d7520f03112c6a6cb49198ed66 Mon Sep 17 00:00:00 2001 From: mbussolotto Date: Thu, 31 Oct 2024 14:23:30 +0100 Subject: [PATCH] REMOVE ME TEST --- java/buildconf/manager-test-includes | 2 +- java/buildconf/test/log4j2.properties | 10 ++++++++++ .../buildconf/test/rhn.conf.postgresql-example | 6 ++++-- java/code/src/log4j2.xml | 18 +++++------------- java/conf/default/rhn_hibernate.conf | 1 + java/conf/default/rhn_reporting_hibernate.conf | 1 + java/manager-build.xml | 2 +- 7 files changed, 23 insertions(+), 17 deletions(-) diff --git a/java/buildconf/manager-test-includes b/java/buildconf/manager-test-includes index 371cbfbfd861..846239ec89d1 100644 --- a/java/buildconf/manager-test-includes +++ b/java/buildconf/manager-test-includes @@ -1 +1 @@ -**/test/*Test.class +**/test/ClientCertificateDigesterTest.class diff --git a/java/buildconf/test/log4j2.properties b/java/buildconf/test/log4j2.properties index 269e2d793e24..b29384dedda2 100644 --- a/java/buildconf/test/log4j2.properties +++ b/java/buildconf/test/log4j2.properties @@ -4,3 +4,13 @@ log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Target=System.out log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p - %m%n +# Log SQL and parameters passed to the database +hibernate.show_sql=true +hibernate.format_sql=true + +# Detailed logging for Hibernate operations +log4j.logger.org.hibernate.engine=TRACE +log4j.logger.org.hibernate.SQL=TRACE +log4j.logger.org.hibernate.type=TRACE +log4j.logger.org.hibernate.orm.mapping.model=TRACE +log4j.logger.org.hibernate.metamodel.mapping=TRACE diff --git a/java/buildconf/test/rhn.conf.postgresql-example b/java/buildconf/test/rhn.conf.postgresql-example index 867122d05d10..ec26b280b338 100644 --- a/java/buildconf/test/rhn.conf.postgresql-example +++ b/java/buildconf/test/rhn.conf.postgresql-example @@ -21,11 +21,13 @@ hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect hibernate.connection.driver_class = org.postgresql.Driver hibernate.connection.driver_proto = jdbc:postgresql # Uncomment to log all SQL statements issued by Hibernate -# hibernate.show_sql = true +hibernate.show_sql = true +hibernate.format_sql = true hibernate.use_outer_join = true hibernate.jdbc.batch_size = 0 hibernate.cache.use_query_cache=false hibernate.cache.use_second_level_cache=false +hibernate.boot.allow_jdbc_metadata_access=false hibernate.bytecode.use_reflection_optimizer = false hibernate.id.new_generator_mappings = false @@ -34,7 +36,7 @@ reporting.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect reporting.hibernate.connection.driver_class = org.postgresql.Driver reporting.hibernate.connection.driver_proto = jdbc:postgresql # Uncomment to log all SQL statements issued by Hibernate -# reporting.hibernate.show_sql = true +reporting.hibernate.show_sql = true reporting.hibernate.use_outer_join = true reporting.hibernate.jdbc.batch_size = 0 reporting.hibernate.cache.use_query_cache=false diff --git a/java/code/src/log4j2.xml b/java/code/src/log4j2.xml index 542f2ee27e0a..f4c6863fe598 100644 --- a/java/code/src/log4j2.xml +++ b/java/code/src/log4j2.xml @@ -30,11 +30,9 @@ - @@ -52,10 +50,8 @@ --> - @@ -90,24 +86,20 @@ - + + - + - diff --git a/java/conf/default/rhn_hibernate.conf b/java/conf/default/rhn_hibernate.conf index ac91e5cbde76..9219683d8afe 100644 --- a/java/conf/default/rhn_hibernate.conf +++ b/java/conf/default/rhn_hibernate.conf @@ -31,6 +31,7 @@ hibernate.c3p0.preferredTestQuery=select 'c3p0 ping' from dual hibernate.cache.use_query_cache=false hibernate.cache.use_second_level_cache=false +hibernate.boot.allow_jdbc_metadata_access=false hibernate.bytecode.use_reflection_optimizer=false hibernate.jdbc.batch_size=0 hibernate.id.new_generator_mappings = true diff --git a/java/conf/default/rhn_reporting_hibernate.conf b/java/conf/default/rhn_reporting_hibernate.conf index 629ec95fb6d4..71ccc2cae745 100644 --- a/java/conf/default/rhn_reporting_hibernate.conf +++ b/java/conf/default/rhn_reporting_hibernate.conf @@ -31,6 +31,7 @@ reporting.hibernate.c3p0.preferredTestQuery=select 'c3p0 ping' from dual hibernate.cache.use_query_cache=false hibernate.cache.use_second_level_cache=false +hibernate.boot.allow_jdbc_metadata_access=false reporting.hibernate.bytecode.use_reflection_optimizer=false reporting.hibernate.jdbc.batch_size=0 reporting.hibernate.id.new_generator_mappings = false diff --git a/java/manager-build.xml b/java/manager-build.xml index ab4e4f9184b3..51749404a641 100644 --- a/java/manager-build.xml +++ b/java/manager-build.xml @@ -482,7 +482,7 @@ - +