[jboss-cvs] JBoss Messaging SVN: r4112 - branches/Branch_JBossMessaging_1_4_0_SP3_CP/tests/src/org/jboss/test/messaging/jms/bridge.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Apr 24 11:37:11 EDT 2008
Author: clebert.suconic at jboss.com
Date: 2008-04-24 11:37:10 -0400 (Thu, 24 Apr 2008)
New Revision: 4112
Modified:
branches/Branch_JBossMessaging_1_4_0_SP3_CP/tests/src/org/jboss/test/messaging/jms/bridge/SimpleCrashWithRestartTest.java
Log:
oops
Modified: branches/Branch_JBossMessaging_1_4_0_SP3_CP/tests/src/org/jboss/test/messaging/jms/bridge/SimpleCrashWithRestartTest.java
===================================================================
--- branches/Branch_JBossMessaging_1_4_0_SP3_CP/tests/src/org/jboss/test/messaging/jms/bridge/SimpleCrashWithRestartTest.java 2008-04-24 14:32:19 UTC (rev 4111)
+++ branches/Branch_JBossMessaging_1_4_0_SP3_CP/tests/src/org/jboss/test/messaging/jms/bridge/SimpleCrashWithRestartTest.java 2008-04-24 15:37:10 UTC (rev 4112)
@@ -134,141 +134,3 @@
// Inner classes -------------------------------------------------------------------
}
-
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * 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.test.messaging.jms.bridge;
-
-import java.util.Properties;
-
-import org.jboss.jms.jndi.JMSProviderAdapter;
-import org.jboss.jms.server.bridge.Bridge;
-import org.jboss.logging.Logger;
-import org.jboss.test.messaging.tools.ServerManagement;
-import org.jboss.test.messaging.tools.TestJMSProviderAdaptor;
-import org.jboss.test.messaging.tools.aop.PoisonInterceptor;
-
-/**
- * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
- * @version <tt>$Revision$</tt>
- *
- * $Id$
- *
- */
-public class SimpleCrashWithRestartTest extends BridgeTestBase
-{
- private static final Logger log = Logger.getLogger(ReconnectTest.class);
-
- public SimpleCrashWithRestartTest(String name)
- {
- super(name);
- }
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- //Now install local JMSProviderAdaptor classes
-
- Properties props1 = new Properties();
- props1.putAll(ServerManagement.getJNDIEnvironment(1));
-
- JMSProviderAdapter targetAdaptor =
- new TestJMSProviderAdaptor(props1, "/XAConnectionFactory", "adaptor1");
-
- sc.installJMSProviderAdaptor("adaptor1", targetAdaptor);
-
- sc.startRecoveryManager();
- }
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
-
- sc.stopRecoveryManager();
-
- sc.uninstallJMSProviderAdaptor("adaptor1");
-
- log.debug(this + " torn down");
- }
-
- /*
- * Send some messages
- * Crash the server after prepare but on commit
- * Bring up the destination server
- * Send some more messages
- * Verify all messages are received
- */
- public void testCrashAndRestart() throws Exception
- {
- Bridge bridge = null;
-
- try
- {
- final int NUM_MESSAGES = 10;
-
- bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
- null, null, null, null,
- null, 1000, -1, Bridge.QOS_AT_MOST_ONCE,
- NUM_MESSAGES, -1,
- null, null, false);
-
- bridge.start();
-
- sendMessages(cf0, sourceQueue, 0, NUM_MESSAGES, true);
-
- checkMessagesReceived(cf1, targetQueue, Bridge.QOS_AT_MOST_ONCE, NUM_MESSAGES, true);
-
- ServerManagement.kill(1);
-
-
- // >30 sec (timeout on remoting)
- Thread.sleep(35000);
-
- ServerManagement.start(1, "all", false);
- ServerManagement.deployQueue("targetQueue", 1);
-
- setUpAdministeredObjects();
-
- sendMessages(cf0, sourceQueue, 0, NUM_MESSAGES, true);
-
- checkMessagesReceived(cf1, targetQueue, Bridge.QOS_AT_MOST_ONCE, NUM_MESSAGES, true);
- }
- finally
- {
- if (bridge != null)
- {
- try
- {
- bridge.stop();
- }
- catch (Exception e)
- {
- log.error("Failed to stop bridge", e);
- }
- }
- }
- }
-
- // Inner classes -------------------------------------------------------------------
-}
-
More information about the jboss-cvs-commits
mailing list