hornetq/hornetq — pull request #1185 by nebnagrom (2013-07-31 11:58:24+00:00)
Title: Fix for HORNETQ-1126, using byteman to test as variables are private

Fix for https://issues.jboss.org/browse/HORNETQ-1126

I had alot of trouble testing this as the serverLocator is not exposed on the Bridge or BridgeImpl. I have used ByteMan to inspect the private variable.

The usage of ByteMan to extract the connectionTTL is not ideal, I found that I could not access the second parameter to the method with $2 so used a fixed bridge name for retrieval. This could also be done by using a shared static variable in a similar manner to the other ByteMan tests such as FailoverTest (https://github.com/hornetq/hornetq/blob/master/tests/byteman-tests/src/test/java/org/hornetq/byteman/tests/FailoverTest.java?source=cc).

I also got some weird errors when I tried to instrument the ClusterManager so did not attempt to test this by making ByteMan perform the assertion when the bridge is created.