Qpid
  1. Qpid
  2. QPID-3467

ManagementActorLoggingTest fails on 0-10 codepath with an ID error (close != open)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.12
    • Fix Version/s: 0.13
    • Component/s: Java Broker
    • Labels:
      None

      Description

      ManagementActorLoggingTest

      TestName: testJMXManagementConsoleConnection Duration: 9.261
      
      Close does not have same id as open, expected:<2> but was:<3>
      
      junit.framework.AssertionFailedError: Close does not have same id as open, expected:<2> but was:<3>
      	at org.apache.qpid.management.jmx.ManagementActorLoggingTest.testJMXManagementConsoleConnection(ManagementActorLoggingTest.java:120)
      	at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:232)
      	at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:120)
                                  
      

        Activity

        Hide
        Alex Rudyy added a comment -

        Attached patch changing the management actor log format and removing test testJMXManagementConsoleConnection as JMX thread ID is not appended to log messages anymore.

        Show
        Alex Rudyy added a comment - Attached patch changing the management actor log format and removing test testJMXManagementConsoleConnection as JMX thread ID is not appended to log messages anymore.
        Hide
        Robbie Gemmell added a comment -

        Changes look good. One thing i noticed is that we will probably be duplicating the user name on the Open messages now, since its already part of the ManagementActor, so we should probably remove that. Also, I think specifically calling out that the user name was not available (e.g. if using JConsole to inject the management agent into a running JVM and logging in without authentication) would be better than the empty string, just to make it explicit.

        Show
        Robbie Gemmell added a comment - Changes look good. One thing i noticed is that we will probably be duplicating the user name on the Open messages now, since its already part of the ManagementActor, so we should probably remove that. Also, I think specifically calling out that the user name was not available (e.g. if using JConsole to inject the management agent into a running JVM and logging in without authentication) would be better than the empty string, just to make it explicit.
        Hide
        Alex Rudyy added a comment -

        The patch is changed and it contains contains the following:

        • default principal name can be passed into ManagementActor constructor.
        • by default N/A is used as a default principal name
        • "JMX SERVER" principal name is used in BeanInvocationHandlerImpl
        • changed log message for connection close event in order to display the user name for closing connection.

        Robbie, could you please review this new patch?

        Show
        Alex Rudyy added a comment - The patch is changed and it contains contains the following: default principal name can be passed into ManagementActor constructor. by default N/A is used as a default principal name "JMX SERVER" principal name is used in BeanInvocationHandlerImpl changed log message for connection close event in order to display the user name for closing connection. Robbie, could you please review this new patch?
        Hide
        Alex Rudyy added a comment -

        Uploaded a new patch which changes MBeanInvocationHandlerImpl to log N/A as a principal name in cases when principal is not available rather than using "JMX SERVER" as a principal name

        Show
        Alex Rudyy added a comment - Uploaded a new patch which changes MBeanInvocationHandlerImpl to log N/A as a principal name in cases when principal is not available rather than using "JMX SERVER" as a principal name
        Hide
        Robbie Gemmell added a comment -

        Changes look good, patch applied.

        Show
        Robbie Gemmell added a comment - Changes look good, patch applied.

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Alex Rudyy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development