[jboss-cvs] JBoss Messaging SVN: r5314 - trunk/tests/src/org/jboss/messaging/tests/integration/cluster.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 7 12:23:33 EST 2008
Author: timfox
Date: 2008-11-07 12:23:33 -0500 (Fri, 07 Nov 2008)
New Revision: 5314
Removed:
trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReconnectSameServerTest.java
Log:
empty test
Deleted: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReconnectSameServerTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReconnectSameServerTest.java 2008-11-07 16:31:27 UTC (rev 5313)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/ReconnectSameServerTest.java 2008-11-07 17:23:33 UTC (rev 5314)
@@ -1,164 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source Copyright 2005-2008, Red Hat
- * Middleware LLC, and individual contributors by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of individual
- * contributors.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 2.1 of the License, or (at your option)
- * any later version.
- *
- * This software is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this software; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
- * site: http://www.fsf.org.
- */
-
-package org.jboss.messaging.tests.integration.cluster;
-
-import junit.framework.TestCase;
-
-import org.jboss.messaging.core.client.ClientConsumer;
-import org.jboss.messaging.core.client.ClientMessage;
-import org.jboss.messaging.core.client.ClientProducer;
-import org.jboss.messaging.core.client.ClientSession;
-import org.jboss.messaging.core.client.impl.ClientSessionFactoryImpl;
-import org.jboss.messaging.core.client.impl.ClientSessionFactoryInternal;
-import org.jboss.messaging.core.client.impl.ClientSessionImpl;
-import org.jboss.messaging.core.config.Configuration;
-import org.jboss.messaging.core.config.TransportConfiguration;
-import org.jboss.messaging.core.config.impl.ConfigurationImpl;
-import org.jboss.messaging.core.exception.MessagingException;
-import org.jboss.messaging.core.logging.Logger;
-import org.jboss.messaging.core.remoting.RemotingConnection;
-import org.jboss.messaging.core.remoting.impl.invm.InVMRegistry;
-import org.jboss.messaging.core.server.MessagingService;
-import org.jboss.messaging.core.server.impl.MessagingServiceImpl;
-import org.jboss.messaging.jms.client.JBossTextMessage;
-import org.jboss.messaging.util.SimpleString;
-
-/**
- *
- * A ReconnectSameServerTest
- *
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- *
- * Created 7 Nov 2008 11:43:25
- *
- *
- */
-public class ReconnectSameServerTest extends TestCase
-{
- private static final Logger log = Logger.getLogger(ReconnectSameServerTest.class);
-
- // Constants -----------------------------------------------------
-
- // Attributes ----------------------------------------------------
-
- private static final SimpleString ADDRESS = new SimpleString("FailoverTestAddress");
-
- private MessagingService liveService;
-
- // Static --------------------------------------------------------
-
- // Constructors --------------------------------------------------
-
- // Public --------------------------------------------------------
-
- public void testReconnectSameServer() throws Exception
- {
- //TODO
- //TODO
- //TODO
-
-
- ClientSessionFactoryInternal sf1 = new ClientSessionFactoryImpl(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMConnectorFactory"),
- null);
-
- sf1.setSendWindowSize(32 * 1024);
-
- ClientSession session1 = sf1.createSession(false, true, true, false);
-
- session1.createQueue(ADDRESS, ADDRESS, null, false, false);
-
- ClientProducer producer = session1.createProducer(ADDRESS);
-
- final int numMessages = 1000;
-
- for (int i = 0; i < numMessages; i++)
- {
- ClientMessage message = session1.createClientMessage(JBossTextMessage.TYPE,
- false,
- 0,
- System.currentTimeMillis(),
- (byte)1);
- message.putIntProperty(new SimpleString("count"), i);
- message.getBody().putString("aardvarks");
- message.getBody().flip();
- producer.send(message);
- }
- log.info("Sent messages");
-
- ClientConsumer consumer1 = session1.createConsumer(ADDRESS);
-
- RemotingConnection conn1 = ((ClientSessionImpl)session1).getConnection();
-
- conn1.fail(new MessagingException(MessagingException.NOT_CONNECTED));
-
- session1.start();
-
- for (int i = 0; i < numMessages; i++)
- {
- ClientMessage message = consumer1.receive(1000);
-
- assertNotNull(message);
-
- assertEquals("aardvarks", message.getBody().getString());
-
- assertEquals(i, message.getProperty(new SimpleString("count")));
-
- message.acknowledge();
- }
-
- ClientMessage message = consumer1.receive(1000);
-
- assertNull(message);
-
- session1.close();
- }
-
- // Package protected ---------------------------------------------
-
- // Protected -----------------------------------------------------
-
- @Override
- protected void setUp() throws Exception
- {
- Configuration liveConf = new ConfigurationImpl();
- liveConf.setSecurityEnabled(false);
- liveConf.getAcceptorConfigurations()
- .add(new TransportConfiguration("org.jboss.messaging.core.remoting.impl.invm.InVMAcceptorFactory"));
- liveService = MessagingServiceImpl.newNullStorageMessagingServer(liveConf);
- liveService.start();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- assertEquals(0, liveService.getServer().getRemotingService().getConnections().size());
-
- liveService.stop();
-
- assertEquals(0, InVMRegistry.instance.size());
- }
-
- // Private -------------------------------------------------------
-
- // Inner classes -------------------------------------------------
-}
More information about the jboss-cvs-commits
mailing list