You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2012/06/16 21:05:34 UTC
svn commit: r1350982 -
/camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjEngineTest.java
Author: bvahdat
Date: Sat Jun 16 19:05:33 2012
New Revision: 1350982
URL: http://svn.apache.org/viewvc?rev=1350982&view=rev
Log:
Added System.out.println() to get a clue about failed tests under JDK 7. Also do explicity disable JMX while not needed.
Modified:
camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjEngineTest.java
Modified: camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjEngineTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjEngineTest.java?rev=1350982&r1=1350981&r2=1350982&view=diff
==============================================================================
--- camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjEngineTest.java (original)
+++ camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjEngineTest.java Sat Jun 16 19:05:33 2012
@@ -103,6 +103,7 @@ public class QuickfixjEngineTest {
settings.setString(Acceptor.SETTING_SOCKET_ACCEPT_PROTOCOL, TransportType.VM_PIPE.toString());
settings.setString(Initiator.SETTING_SOCKET_CONNECT_PROTOCOL, TransportType.VM_PIPE.toString());
settings.setBool(Session.SETTING_USE_DATA_DICTIONARY, false);
+ settings.setBool(QuickfixjEngine.SETTING_USE_JMX, false);
TestSupport.setSessionID(settings, sessionID);
}
@@ -589,7 +590,16 @@ public class QuickfixjEngineTest {
assertThat(quickfixjEngine.getMessageFactory(), instanceOf(DefaultMessageFactory.class));
MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
Set<ObjectName> names = mbeanServer.queryNames(new ObjectName("org.quickfixj:*"), null);
- assertTrue("QFJ mbean should not not registered", names.isEmpty());
+
+ // Try to find the root cause of the failed tests under jdk7 as from time to time the returned Set is not empty!
+ if (!names.isEmpty()) {
+ System.out.println("The JMX objects found for the name 'org.quickfixj:*':");
+ for (ObjectName name : names) {
+ System.out.println("ObjectName => '" + name + "'");
+ }
+ }
+
+ assertTrue("QFJ mbean should not have been registered", names.isEmpty());
}
private void writeSettings() throws IOException {