JBoss hornetq SVN: r10104 - in trunk: tests/src/org/hornetq/tests/integration/client and 1 other directory.
by do-not-reply@jboss.org
Author: igarashitm
Date: 2011-01-02 00:04:27 -0500 (Sun, 02 Jan 2011)
New Revision: 10104
Modified:
trunk/src/main/org/hornetq/utils/VersionLoader.java
trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
Log:
IncompatibleVersionTest: make sure the external server process has been terminated on the end of testcase
Modified: trunk/src/main/org/hornetq/utils/VersionLoader.java
===================================================================
--- trunk/src/main/org/hornetq/utils/VersionLoader.java 2011-01-02 02:59:42 UTC (rev 10103)
+++ trunk/src/main/org/hornetq/utils/VersionLoader.java 2011-01-02 05:04:27 UTC (rev 10104)
@@ -46,6 +46,12 @@
{
try
{
+ PROP_FILE_NAME = System.getProperty(VersionLoader.VERSION_PROP_FILE_KEY);
+ if(PROP_FILE_NAME == null)
+ {
+ PROP_FILE_NAME = VersionLoader.DEFAULT_PROP_FILE_NAME;
+ }
+
VersionLoader.version = VersionLoader.load();
}
catch (Throwable e)
@@ -68,12 +74,6 @@
private static Version load()
{
- PROP_FILE_NAME = System.getProperty(VersionLoader.VERSION_PROP_FILE_KEY);
- if(PROP_FILE_NAME == null)
- {
- PROP_FILE_NAME = VersionLoader.DEFAULT_PROP_FILE_NAME;
- }
-
Properties versionProps = new Properties();
InputStream in = VersionImpl.class.getClassLoader().getResourceAsStream(VersionLoader.PROP_FILE_NAME);
try
Modified: trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-01-02 02:59:42 UTC (rev 10103)
+++ trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-01-02 05:04:27 UTC (rev 10104)
@@ -183,22 +183,37 @@
prop.setProperty("hornetq.version.incrementingVersion", Integer.toString(ver));
prop.store(new FileOutputStream("tests/tmpfiles/" + propFileName), null);
- SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
- new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
- "server",
- serverStartedString);
+ Process server = null;
+ boolean result = false;
+ try
+ {
+ server = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
+ new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
+ "server",
+ serverStartedString);
+ Thread.sleep(2000);
- Thread.sleep(2000);
+ Process client = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
+ new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
+ "client");
- Process client = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
- new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
- "client");
-
- boolean result = false;
- if(client.waitFor() == 0)
+ if(client.waitFor() == 0)
+ {
+ result = true;
+ }
+ }
+ finally
{
- result = true;
+ if(server != null)
+ {
+ try
+ {
+ server.destroy();
+ }
+ catch(Throwable t) {/* ignore */}
+ }
}
+
return result;
}
14 years
JBoss hornetq SVN: r10103 - in trunk: tests/src/org/hornetq/tests/integration/client and 1 other directories.
by do-not-reply@jboss.org
Author: igarashitm
Date: 2011-01-01 21:59:42 -0500 (Sat, 01 Jan 2011)
New Revision: 10103
Modified:
trunk/src/main/org/hornetq/utils/VersionLoader.java
trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
trunk/tests/src/org/hornetq/tests/unit/util/VersionLoaderTest.java
Log:
https://issues.jboss.org/browse/HORNETQ-445
added testcases for client compatibility validation with real connection
Modified: trunk/src/main/org/hornetq/utils/VersionLoader.java
===================================================================
--- trunk/src/main/org/hornetq/utils/VersionLoader.java 2011-01-02 01:43:27 UTC (rev 10102)
+++ trunk/src/main/org/hornetq/utils/VersionLoader.java 2011-01-02 02:59:42 UTC (rev 10103)
@@ -34,8 +34,12 @@
private static final Logger log = Logger.getLogger(VersionLoader.class);
- public static final String PROP_FILE_NAME = "hornetq-version.properties";
+ public static final String VERSION_PROP_FILE_KEY = "hornetq.version.property.filename";
+
+ public static final String DEFAULT_PROP_FILE_NAME = "hornetq-version.properties";
+ private static String PROP_FILE_NAME;
+
private static Version version;
static
@@ -64,6 +68,12 @@
private static Version load()
{
+ PROP_FILE_NAME = System.getProperty(VersionLoader.VERSION_PROP_FILE_KEY);
+ if(PROP_FILE_NAME == null)
+ {
+ PROP_FILE_NAME = VersionLoader.DEFAULT_PROP_FILE_NAME;
+ }
+
Properties versionProps = new Properties();
InputStream in = VersionImpl.class.getClassLoader().getResourceAsStream(VersionLoader.PROP_FILE_NAME);
try
Modified: trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-01-02 01:43:27 UTC (rev 10102)
+++ trunk/tests/src/org/hornetq/tests/integration/client/IncompatibleVersionTest.java 2011-01-02 02:59:42 UTC (rev 10103)
@@ -14,16 +14,24 @@
package org.hornetq.tests.integration.client;
import static org.hornetq.tests.util.RandomUtil.randomString;
+import org.hornetq.tests.util.SpawnedVMSupport;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.TransportConfiguration;
+import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
+import org.hornetq.core.config.Configuration;
+import org.hornetq.core.config.impl.ConfigurationImpl;
+import org.hornetq.core.logging.Logger;
import org.hornetq.core.protocol.core.Channel;
import org.hornetq.core.protocol.core.CoreRemotingConnection;
import org.hornetq.core.protocol.core.Packet;
@@ -32,6 +40,8 @@
import org.hornetq.core.remoting.impl.invm.InVMConnectorFactory;
import org.hornetq.core.remoting.server.impl.RemotingServiceImpl;
import org.hornetq.core.server.HornetQServer;
+import org.hornetq.core.server.HornetQServers;
+import org.hornetq.core.version.impl.VersionImpl;
import org.hornetq.tests.util.ServiceTestBase;
import org.hornetq.utils.VersionLoader;
@@ -44,7 +54,7 @@
*/
public class IncompatibleVersionTest extends ServiceTestBase
{
-
+ private static final Logger log = Logger.getLogger(IncompatibleVersionTest.class);
// Constants -----------------------------------------------------
// Attributes ----------------------------------------------------
@@ -93,6 +103,20 @@
doTestClientVersionCompatibility(false);
}
+ public void testCompatibleClientVersionWithRealConnection() throws Exception
+ {
+ assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",1));
+ assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",5));
+ assertTrue(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",10));
+ }
+
+ public void testIncompatibleClientVersionWithRealConnection() throws Exception
+ {
+ assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",0));
+ assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",4));
+ assertFalse(doTestClientVersionCompatibilityWithRealConnection("1-3,5,7-10",100));
+ }
+
private void doTestClientVersionCompatibility(boolean compatible) throws Exception
{
Channel channel1 = connection.getChannel(1, -1);
@@ -147,6 +171,82 @@
}
}
+ private boolean doTestClientVersionCompatibilityWithRealConnection(String verList, int ver) throws Exception
+ {
+ String propFileName = "compatibility-test-hornetq-version.properties";
+ String serverStartedString = "IncompatibleVersionTest---server---started";
+
+ Properties prop = new Properties();
+ InputStream in = VersionImpl.class.getClassLoader().getResourceAsStream("hornetq-version.properties");
+ prop.load(in);
+ prop.setProperty("hornetq.version.compatibleVersionList", verList);
+ prop.setProperty("hornetq.version.incrementingVersion", Integer.toString(ver));
+ prop.store(new FileOutputStream("tests/tmpfiles/" + propFileName), null);
+
+ SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
+ new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
+ "server",
+ serverStartedString);
+
+ Thread.sleep(2000);
+
+ Process client = SpawnedVMSupport.spawnVM("org.hornetq.tests.integration.client.IncompatibleVersionTest",
+ new String[]{"-D" + VersionLoader.VERSION_PROP_FILE_KEY + "=" + propFileName},
+ "client");
+
+ boolean result = false;
+ if(client.waitFor() == 0)
+ {
+ result = true;
+ }
+ return result;
+ }
+
+ private static class ServerStarter
+ {
+ public void perform(String startedString) throws Exception
+ {
+ Configuration conf = new ConfigurationImpl();
+ conf.setSecurityEnabled(false);
+ conf.getAcceptorConfigurations().add(new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory"));
+ HornetQServer server = HornetQServers.newHornetQServer(conf, false);
+ server.start();
+
+ log.info("### server: " + startedString);
+ }
+ }
+ private static class ClientStarter
+ {
+ public void perform() throws Exception
+ {
+ ServerLocator locator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration("org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"));
+ ClientSessionFactory sf = locator.createSessionFactory();
+ ClientSession session = sf.createSession(false, true, true);
+ log.info("### client: connected. server incrementingVersion = " + session.getVersion());
+ session.close();
+ sf.close();
+ locator.close();
+ }
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ if(args[0].equals("server"))
+ {
+ ServerStarter ss = new ServerStarter();
+ ss.perform(args[1]);
+ }
+ else if(args[0].equals("client"))
+ {
+ ClientStarter cs = new ClientStarter();
+ cs.perform();
+ }
+ else
+ {
+ throw new Exception("args[0] must be \"server\" or \"client\"");
+ }
+ }
+
// Package protected ---------------------------------------------
// Protected -----------------------------------------------------
Modified: trunk/tests/src/org/hornetq/tests/unit/util/VersionLoaderTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/util/VersionLoaderTest.java 2011-01-02 01:43:27 UTC (rev 10102)
+++ trunk/tests/src/org/hornetq/tests/unit/util/VersionLoaderTest.java 2011-01-02 02:59:42 UTC (rev 10103)
@@ -43,7 +43,7 @@
{
Version version = VersionLoader.getVersion();
Properties props = new Properties();
- props.load(ClassLoader.getSystemResourceAsStream(VersionLoader.PROP_FILE_NAME));
+ props.load(ClassLoader.getSystemResourceAsStream(VersionLoader.DEFAULT_PROP_FILE_NAME));
Assert.assertEquals(props.get("hornetq.version.versionName"), version.getVersionName());
Assert.assertEquals(props.get("hornetq.version.versionSuffix"), version.getVersionSuffix());
14 years
JBoss hornetq SVN: r10102 - trunk/tests/src/org/hornetq/tests/integration/spring.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-01-01 20:43:27 -0500 (Sat, 01 Jan 2011)
New Revision: 10102
Modified:
trunk/tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java
Log:
tweaks
Modified: trunk/tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java 2011-01-02 00:57:33 UTC (rev 10101)
+++ trunk/tests/src/org/hornetq/tests/integration/spring/SpringIntegrationTest.java 2011-01-02 01:43:27 UTC (rev 10102)
@@ -16,15 +16,27 @@
public void testSpring() throws Exception
{
System.out.println("Creating bean factory...");
- ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"spring-jms-beans.xml"});
- MessageSender sender = (MessageSender)context.getBean("MessageSender");
- System.out.println("Sending message...");
- sender.send("Hello world");
- Thread.sleep(100);
- Assert.assertEquals(ExampleListener.lastMessage, "Hello world");
-
- EmbeddedJMS jms = (EmbeddedJMS) context.getBean("EmbeddedJms");
- jms.stop();
-
+ ApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "spring-jms-beans.xml" });
+ try
+ {
+ MessageSender sender = (MessageSender)context.getBean("MessageSender");
+ System.out.println("Sending message...");
+ sender.send("Hello world");
+ Thread.sleep(100);
+ Assert.assertEquals(ExampleListener.lastMessage, "Hello world");
+ }
+ finally
+ {
+ try
+ {
+ EmbeddedJMS jms = (EmbeddedJMS)context.getBean("EmbeddedJms");
+ jms.stop();
+ }
+ catch (Throwable ignored)
+ {
+ ignored.printStackTrace();
+ }
+ }
+
}
}
14 years
JBoss hornetq SVN: r10101 - trunk/src/main/org/hornetq/core/paging/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-01-01 19:57:33 -0500 (Sat, 01 Jan 2011)
New Revision: 10101
Modified:
trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
Log:
fixing test
Modified: trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java 2011-01-02 00:48:23 UTC (rev 10100)
+++ trunk/src/main/org/hornetq/core/paging/impl/PagingStoreImpl.java 2011-01-02 00:57:33 UTC (rev 10101)
@@ -16,7 +16,6 @@
import java.text.DecimalFormat;
import java.util.Collections;
import java.util.HashSet;
-import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Set;
@@ -56,9 +55,8 @@
import org.hornetq.core.settings.impl.AddressSettings;
import org.hornetq.core.transaction.Transaction;
import org.hornetq.core.transaction.Transaction.State;
-import org.hornetq.core.transaction.TransactionOperationAbstract;
-import org.hornetq.core.transaction.impl.TransactionImpl;
import org.hornetq.core.transaction.TransactionOperation;
+import org.hornetq.core.transaction.TransactionOperationAbstract;
import org.hornetq.core.transaction.TransactionPropertyIndexes;
import org.hornetq.utils.ExecutorFactory;
import org.hornetq.utils.Future;
@@ -877,6 +875,7 @@
{
// Make sure nothing is currently validating or using currentPage
openNewPage();
+ currentPageSize.addAndGet(bytesToWrite);
}
currentPage.write(pagedMessage);
14 years
JBoss hornetq SVN: r10100 - trunk/src/main/org/hornetq/core/client/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-01-01 19:48:23 -0500 (Sat, 01 Jan 2011)
New Revision: 10100
Modified:
trunk/src/main/org/hornetq/core/client/impl/ClientMessageImpl.java
Log:
HORNETQ-604 - flush
Modified: trunk/src/main/org/hornetq/core/client/impl/ClientMessageImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/client/impl/ClientMessageImpl.java 2011-01-02 00:38:16 UTC (rev 10099)
+++ trunk/src/main/org/hornetq/core/client/impl/ClientMessageImpl.java 2011-01-02 00:48:23 UTC (rev 10100)
@@ -147,6 +147,7 @@
byte readBuffer[] = new byte[getBodySize()];
getBodyBuffer().readBytes(readBuffer);
out.write(readBuffer);
+ out.flush();
}
catch (IOException e)
{
14 years
JBoss hornetq SVN: r10099 - trunk/src/main/org/hornetq/jms/server/impl.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-01-01 19:38:16 -0500 (Sat, 01 Jan 2011)
New Revision: 10099
Modified:
trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
Log:
Fixing springTest
Modified: trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java
===================================================================
--- trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2011-01-01 23:52:51 UTC (rev 10098)
+++ trunk/src/main/org/hornetq/jms/server/impl/JMSServerManagerImpl.java 2011-01-02 00:38:16 UTC (rev 10099)
@@ -227,9 +227,9 @@
return;
}
- if (!contextSet)
+ if (registry == null)
{
- context = new InitialContext();
+ if (!contextSet) context = new InitialContext();
registry = new JndiBindingRegistry(context);
}
@@ -1284,35 +1284,9 @@
private boolean bindToJndi(final String jndiName, final Object objectToBind) throws NamingException
{
- if (context != null)
+ if (registry != null)
{
- String parentContext;
- String jndiNameInContext;
- int sepIndex = jndiName.lastIndexOf('/');
- if (sepIndex == -1)
- {
- parentContext = "";
- }
- else
- {
- parentContext = jndiName.substring(0, sepIndex);
- }
- jndiNameInContext = jndiName.substring(sepIndex + 1);
- try
- {
- context.lookup(jndiName);
-
- JMSServerManagerImpl.log.warn("Binding for " + jndiName + " already exists");
- return false;
- }
- catch (Throwable e)
- {
- // OK
- }
-
- Context c = org.hornetq.utils.JNDIUtil.createContext(context, parentContext);
-
- c.rebind(jndiNameInContext, objectToBind);
+ registry.bind(jndiName, objectToBind);
}
return true;
}
14 years
JBoss hornetq SVN: r10098 - trunk/tests/src/org/hornetq/tests/stress/paging.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-01-01 18:52:51 -0500 (Sat, 01 Jan 2011)
New Revision: 10098
Modified:
trunk/tests/src/org/hornetq/tests/stress/paging/PageStressTest.java
Log:
fixing test
Modified: trunk/tests/src/org/hornetq/tests/stress/paging/PageStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/paging/PageStressTest.java 2011-01-01 22:07:31 UTC (rev 10097)
+++ trunk/tests/src/org/hornetq/tests/stress/paging/PageStressTest.java 2011-01-01 23:52:51 UTC (rev 10098)
@@ -19,7 +19,12 @@
import org.hornetq.api.core.HornetQException;
import org.hornetq.api.core.SimpleString;
-import org.hornetq.api.core.client.*;
+import org.hornetq.api.core.client.ClientConsumer;
+import org.hornetq.api.core.client.ClientMessage;
+import org.hornetq.api.core.client.ClientProducer;
+import org.hornetq.api.core.client.ClientSession;
+import org.hornetq.api.core.client.ClientSessionFactory;
+import org.hornetq.api.core.client.ServerLocator;
import org.hornetq.core.config.Configuration;
import org.hornetq.core.server.HornetQServer;
import org.hornetq.core.settings.impl.AddressSettings;
@@ -64,9 +69,6 @@
messagingService.start();
ClientSessionFactory factory = locator.createSessionFactory();
- factory.getServerLocator().setBlockOnAcknowledge(true);
- factory.getServerLocator().setBlockOnDurableSend(false);
- factory.getServerLocator().setBlockOnNonDurableSend(false);
ClientSession session = null;
try
@@ -303,6 +305,11 @@
clearData();
locator = createInVMNonHALocator();
+
+ locator.setBlockOnAcknowledge(true);
+ locator.setBlockOnDurableSend(false);
+ locator.setBlockOnNonDurableSend(false);
+
}
@Override
14 years
JBoss hornetq SVN: r10097 - in trunk/tests/src/org/hornetq/tests: unit/core/postoffice/impl and 1 other directory.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-01-01 17:07:31 -0500 (Sat, 01 Jan 2011)
New Revision: 10097
Modified:
trunk/tests/src/org/hornetq/tests/stress/paging/PageCursorStressTest.java
trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/FakeQueue.java
Log:
fixing a stress test
Modified: trunk/tests/src/org/hornetq/tests/stress/paging/PageCursorStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/paging/PageCursorStressTest.java 2011-01-01 20:59:31 UTC (rev 10096)
+++ trunk/tests/src/org/hornetq/tests/stress/paging/PageCursorStressTest.java 2011-01-01 22:07:31 UTC (rev 10097)
@@ -1281,8 +1281,14 @@
private PageSubscription createNonPersistentCursor(Filter filter) throws Exception
{
long id = server.getStorageManager().generateUniqueID();
- queueList.add(new FakeQueue(new SimpleString(filter.toString()), id));
- return lookupCursorProvider().createSubscription(id, filter, false);
+ FakeQueue queue = new FakeQueue(new SimpleString(filter.toString()), id);
+ queueList.add(queue);
+
+ PageSubscription subs = lookupCursorProvider().createSubscription(id, filter, false);
+
+ queue.setPageSubscription(subs);
+
+ return subs;
}
/**
Modified: trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/FakeQueue.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/FakeQueue.java 2011-01-01 20:59:31 UTC (rev 10096)
+++ trunk/tests/src/org/hornetq/tests/unit/core/postoffice/impl/FakeQueue.java 2011-01-01 22:07:31 UTC (rev 10097)
@@ -37,6 +37,9 @@
*/
public class FakeQueue implements Queue
{
+
+ PageSubscription subs;
+
public boolean isDirectDeliver()
{
// TODO Auto-generated method stub
@@ -610,8 +613,12 @@
*/
public PageSubscription getPageSubscription()
{
- // TODO Auto-generated method stub
- return null;
+ return subs;
}
+
+ public void setPageSubscription(PageSubscription sub)
+ {
+ this.subs = sub;
+ }
}
\ No newline at end of file
14 years
JBoss hornetq SVN: r10096 - trunk/tests/src/org/hornetq/tests/stress/journal.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-01-01 15:59:31 -0500 (Sat, 01 Jan 2011)
New Revision: 10096
Modified:
trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java
Log:
fixing test
Modified: trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java 2011-01-01 20:54:50 UTC (rev 10095)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/MultiThreadConsumerStressTest.java 2011-01-01 20:59:31 UTC (rev 10096)
@@ -51,8 +51,6 @@
private ClientSessionFactory sf;
- private ServerLocator locator;
-
@Override
protected void setUp() throws Exception
{
@@ -151,8 +149,6 @@
@Override
protected void tearDown() throws Exception
{
- locator.close();
-
try
{
if (server != null && server.isStarted())
@@ -188,13 +184,13 @@
ServerLocator locator = createNettyNonHALocator();
- sf = locator.createSessionFactory();
+ locator.setBlockOnDurableSend(false);
- sf.getServerLocator().setBlockOnDurableSend(false);
+ locator.setBlockOnNonDurableSend(false);
- sf.getServerLocator().setBlockOnNonDurableSend(false);
+ locator.setBlockOnAcknowledge(false);
- sf.getServerLocator().setBlockOnAcknowledge(false);
+ sf = locator.createSessionFactory();
ClientSession sess = sf.createSession();
14 years
JBoss hornetq SVN: r10095 - trunk/tests/src/org/hornetq/tests/stress/journal.
by do-not-reply@jboss.org
Author: clebert.suconic(a)jboss.com
Date: 2011-01-01 15:54:50 -0500 (Sat, 01 Jan 2011)
New Revision: 10095
Modified:
trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java
Log:
fixing stress test
Modified: trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java 2011-01-01 20:51:06 UTC (rev 10094)
+++ trunk/tests/src/org/hornetq/tests/stress/journal/LargeJournalStressTest.java 2011-01-01 20:54:50 UTC (rev 10095)
@@ -257,6 +257,11 @@
clearData();
locator = createInVMNonHALocator();
+
+ locator.setBlockOnAcknowledge(false);
+ locator.setBlockOnNonDurableSend(false);
+ locator.setBlockOnDurableSend(false);
+
}
/**
@@ -279,9 +284,6 @@
server.start();
sf = locator.createSessionFactory();
- sf.getServerLocator().setBlockOnAcknowledge(false);
- sf.getServerLocator().setBlockOnNonDurableSend(false);
- sf.getServerLocator().setBlockOnDurableSend(false);
ClientSession sess = sf.createSession();
14 years