Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2756

Enabling/disabling RpcManager statistics via JMX doesn't work

    Details

      Description

      The test RpcManagerMBeanTest.testEnableJmxStats tries to write to the "StatisticsEnabled" attribute but fails. The operation doesn't throw an exception, but it does log this WARN message:

      10:43:42,079 WARN  (testng-RpcManagerMBeanTest:) [ResourceDMBean] ISPN000043: Exception while writing value for attribute statisticsEnabled
      java.lang.NullPointerException
      	at org.infinispan.jmx.ResourceDMBean$InvokableSetterBasedMBeanAttributeInfo.invoke(ResourceDMBean.java:391)
      	at org.infinispan.jmx.ResourceDMBean.setNamedAttribute(ResourceDMBean.java:325)
      	at org.infinispan.jmx.ResourceDMBean.setAttribute(ResourceDMBean.java:212)
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.setAttribute(DefaultMBeanServerInterceptor.java:746)
      	at com.sun.jmx.mbeanserver.JmxMBeanServer.setAttribute(JmxMBeanServer.java:729)
      	at org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats(RpcManagerMBeanTest.java:134)
      

      Because statistics are still enabled, the test then fails with an assertion error:

      10:43:42,464 ERROR (testng-RpcManagerMBeanTest:) [UnitTestTestNGListener] Test testEnableJmxStats(org.infinispan.jmx.RpcManagerMBeanTest) failed.
      java.lang.AssertionError: expected [-1] but found [1]
      	at org.testng.Assert.fail(Assert.java:94)
      	at org.testng.Assert.failNotEquals(Assert.java:494)
      	at org.testng.Assert.assertEquals(Assert.java:123)
      	at org.testng.Assert.assertEquals(Assert.java:165)
      	at org.infinispan.jmx.RpcManagerMBeanTest.testEnableJmxStats(RpcManagerMBeanTest.java:138)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dan.berindei Dan Berindei
                  Reporter:
                  dan.berindei Dan Berindei
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: