Skip to content

Commit

Permalink
REMOVE ME TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Nov 4, 2024
1 parent 7bca045 commit 8eda3d8
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion java/buildconf/manager-test-includes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
**/test/*Test.class
**/test/ClientCertificateDigesterTest.class
10 changes: 10 additions & 0 deletions java/buildconf/test/log4j2.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions java/buildconf/test/rhn.conf.postgresql-example
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
18 changes: 5 additions & 13 deletions java/code/src/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
<DefaultRolloverStrategy max="30" />
</RollingFile>
<!-- Uncomment for hibernate logging -->
<!--
<File name="hibernateAppender" fileName="/var/log/rhn/rhn_web_hibernate.log">
<PatternLayout pattern="[%d] %-5p - %m%n" />
</File>
-->
<FailOver name="xmlRpcFailOverAppender" primary="apiLogFileAppender">
<FailOvers>
<AppenderRef ref="rootAppender" />
Expand All @@ -52,10 +50,8 @@
-->

<!-- General debug for everything. Very noisy -->
<!--
<Logger name="com.redhat.rhn" level="debug" />
<Logger name="com.suse" level="debug" />
-->

<!-- Logging for login-attempts -->
<Logger name="com.suse.manager.webui.controllers.login.LoginController" level="info" />
Expand Down Expand Up @@ -90,24 +86,20 @@
</Logger>

<!-- Hibernate logging -->
<!--
<Logger name="org.hibernate" level="debug" additivity="false">
<Logger name="org.hibernate" level="trace" additivity="false">
<AppenderRef ref="hibernateAppender" />
</Logger>

<Logger name="org.hibernate.type" level="trace" />
-->
<Logger name="org.hibernate.orm.mapping.model" level="trace" />
<Logger name="org.hibernate.metamodel.mapping" level="trace" />

<!-- log SQL statements -->
<!--
<Logger name="org.hibernate.SQL" level="debug" />
-->
<Logger name="org.hibernate.SQL" level="trace" />

<!--
<Logger name="net.rkbloom.logdriver" level="debug" additivity="false">
<Logger name="net.rkbloom.logdriver" level="trace" additivity="false">
<AppenderRef ref="hibernateAppender" />
</Logger>
-->

<Root level="warn"><AppenderRef ref="rootAppender" /></Root>
</Loggers>
Expand Down
1 change: 1 addition & 0 deletions java/conf/default/rhn_hibernate.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions java/conf/default/rhn_reporting_hibernate.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion java/manager-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@
<sysproperty key="log4j.threshold" value="warn"/>
<sysproperty key="rhn.config.dir" value="${tests.configuration.path}"/>
<jvmarg value="-ea"/>
<!-- <jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" /> -->
<jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" />
<jvmarg value="${jacocoagent}"/>
</fork>
<zipfileset src="${build.dir}/rhn.jar" includesfile="${tests.includes}"
Expand Down

0 comments on commit 8eda3d8

Please sign in to comment.