[hornetq-commits] JBoss hornetq SVN: r10668 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon May 16 12:57:51 EDT 2011
Author: borges
Date: 2011-05-16 12:57:50 -0400 (Mon, 16 May 2011)
New Revision: 10668
Modified:
trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
Log:
Use class objects instead of hard-coding classnames
Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-05-16 15:30:02 UTC (rev 10667)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-05-16 16:57:50 UTC (rev 10668)
@@ -33,6 +33,8 @@
import org.hornetq.core.protocol.core.Packet;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionMessage;
import org.hornetq.core.protocol.core.impl.wireformat.CreateSessionResponseMessage;
+import org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory;
+import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.server.HornetQServers;
@@ -180,13 +182,13 @@
boolean result = false;
try
{
- server = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
+ server = SpawnedVMSupport.spawnVM(IncompatibleVersionTest.class.getCanonicalName(),
new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
"server",
serverStartedString);
Thread.sleep(2000);
- Process client = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
+ Process client = SpawnedVMSupport.spawnVM(IncompatibleVersionTest.class.getCanonicalName(),
new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
"client");
@@ -216,7 +218,7 @@
{
Configuration conf = new ConfigurationImpl();
conf.setSecurityEnabled(false);
- conf.getAcceptorConfigurations().add(new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory"));
+ conf.getAcceptorConfigurations().add(new TransportConfiguration(NettyAcceptorFactory.class.getCanonicalName()));
HornetQServer server = HornetQServers.newHornetQServer(conf, false);
server.start();
@@ -227,7 +229,7 @@
{
public void perform() throws Exception
{
- ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"));
+ ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getCanonicalName()));
ClientSessionFactory sf = locator.createSessionFactory();
ClientSession session = sf.createSession(false, true, true);
log.info("### client: connected. server incrementingVersion = " + session.getVersion());
More information about the hornetq-commits
mailing list