[jboss-jira] [JBoss JIRA] (WFCORE-2997) Intermittent failures in JmxAuditLogFieldsOfLogTestCase
Kabir Khan (JIRA)
issues at jboss.org
Thu Jun 22 04:13:00 EDT 2017
[ https://issues.jboss.org/browse/WFCORE-2997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kabir Khan reassigned WFCORE-2997:
----------------------------------
Assignee: Kabir Khan
> Intermittent failures in JmxAuditLogFieldsOfLogTestCase
> -------------------------------------------------------
>
> Key: WFCORE-2997
> URL: https://issues.jboss.org/browse/WFCORE-2997
> Project: WildFly Core
> Issue Type: Bug
> Reporter: Kabir Khan
> Assignee: Kabir Khan
>
> This test fails due to an extra entry now and again for calls to unregisterMBean for ObjectNames of the type "jboss.modules:type=ModuleLoader,name=ServiceModuleLoader-nnn".
> {code}
> java.lang.AssertionError: [{ "type" => "jmx", "r/o" => false, "booting" => false, "version" => "3.0.0.Beta27-SNAPSHOT", "user" => "anonymous", "domainUUID" => undefined, "access" => undefined, "remote-address" => undefined, "method" => "unregisterMBean", "sig" => ["javax.management.ObjectName"], "params" => ["jboss.modules:type=ModuleLoader,name=ServiceModuleLoader-3"]}, { "type" => "jmx", "r/o" => true, "booting" => false, "version" => "3.0.0.Beta27-SNAPSHOT", "user" => "IAmAdmin", "domainUUID" => undefined, "access" => "JMX", "remote-address" => "/0:0:0:0:0:0:0:1", "method" => "queryMBeans", "sig" => [ "javax.management.ObjectName", "javax.management.QueryExp" ], "params" => [ "java.lang:*", undefined ]}] expected:<1> but was:<2> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.jboss.as.test.manualmode.auditlog.AbstractLogFieldsOfLogTestCase.readFile(AbstractLogFieldsOfLogTestCase.java:144) at org.jboss.as.test.manualmode.auditlog.JmxAuditLogFieldsOfLogTestCase.testJmxAuditLoggingFields(JmxAuditLogFieldsOfLogTestCase.java:60)
> {code}
> When the ServiceLoaders are created, these XMBeans are registered and hold a WeakReference to the ServiceLoader, The WeakReference has a reference queue which triggers a Reaper in ModuleLoader. This Reaper is then run when the weak reference is cleared, and results in the call to unregister the mbean which is then logged in the audit log.
> When this happens in not-deterministic and can happen at any time, so the test should strip out these .
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list