[jboss-cvs] JBoss Messaging SVN: r2919 - in trunk: tests/src/org/jboss/test/messaging/jms and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jul 20 06:24:57 EDT 2007
Author: timfox
Date: 2007-07-20 06:24:57 -0400 (Fri, 20 Jul 2007)
New Revision: 2919
Modified:
trunk/src/main/org/jboss/jms/server/ServerPeer.java
trunk/tests/src/org/jboss/test/messaging/jms/XAResourceRecoveryTest.java
trunk/tests/src/org/jboss/test/messaging/tools/ServerManagement.java
Log:
Fixed XAResourceRecoveryTest
Modified: trunk/src/main/org/jboss/jms/server/ServerPeer.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/ServerPeer.java 2007-07-19 23:23:35 UTC (rev 2918)
+++ trunk/src/main/org/jboss/jms/server/ServerPeer.java 2007-07-20 10:24:57 UTC (rev 2919)
@@ -309,8 +309,8 @@
return;
}
- log.debug(this + " stopping");
-
+ log.info(this + " is Stopping. NOTE! Stopping the server peer cleanly will NOT cause failover to occur");
+
started = false;
//Tell the invocation handler we are closed - this is so we don't attempt to handle
Modified: trunk/tests/src/org/jboss/test/messaging/jms/XAResourceRecoveryTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/XAResourceRecoveryTest.java 2007-07-19 23:23:35 UTC (rev 2918)
+++ trunk/tests/src/org/jboss/test/messaging/jms/XAResourceRecoveryTest.java 2007-07-20 10:24:57 UTC (rev 2919)
@@ -167,19 +167,16 @@
{
ServerManagement.undeployQueue("queue0", 0);
}
- catch (Exception e)
+ catch (Exception ignore)
{
- log.error("Failed to undeploy", e);
}
-
-
+
try
{
ServerManagement.undeployQueue("queue1", 1);
}
- catch (Exception e)
+ catch (Exception ignore)
{
- log.error("Failed to undeploy", e);
}
if (TxUtils.isUncommitted(tm))
@@ -206,35 +203,35 @@
tm.resume(suspendedTx);
}
- for (int i = 0; i < nodeCount; i++)
- {
- try
- {
- if (ServerManagement.isStarted(i))
- {
- ServerManagement.log(ServerManagement.INFO, "Undeploying Server " + i, i);
-
- ServerManagement.stop(i);
- }
- }
- catch (Exception e)
- {
- log.error("Failed to stop server", e);
- }
- }
+// for (int i = 0; i < nodeCount; i++)
+// {
+// try
+// {
+// if (ServerManagement.isStarted(i))
+// {
+// ServerManagement.log(ServerManagement.INFO, "Undeploying Server " + i, i);
+//
+// ServerManagement.stop(i);
+// }
+// }
+// catch (Exception e)
+// {
+// log.error("Failed to stop server", e);
+// }
+// }
+//
+// for (int i = 1; i < nodeCount; i++)
+// {
+// try
+// {
+// ServerManagement.kill(i);
+// }
+// catch (Exception e)
+// {
+// log.error("Failed to kill server", e);
+// }
+// }
- for (int i = 1; i < nodeCount; i++)
- {
- try
- {
- ServerManagement.kill(i);
- }
- catch (Exception e)
- {
- log.error("Failed to kill server", e);
- }
- }
-
sc.uninstallJMSProviderAdaptor("adaptor1");
sc.stopRecoveryManager();
Modified: trunk/tests/src/org/jboss/test/messaging/tools/ServerManagement.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/tools/ServerManagement.java 2007-07-19 23:23:35 UTC (rev 2918)
+++ trunk/tests/src/org/jboss/test/messaging/tools/ServerManagement.java 2007-07-20 10:24:57 UTC (rev 2919)
@@ -42,6 +42,7 @@
import org.jboss.messaging.core.contract.MessageStore;
import org.jboss.messaging.core.contract.PersistenceManager;
import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.test.messaging.tools.aop.PoisonInterceptor;
import org.jboss.test.messaging.tools.jmx.ServiceAttributeOverrides;
import org.jboss.test.messaging.tools.jmx.rmi.LocalTestServer;
import org.jboss.test.messaging.tools.jmx.rmi.NotificationListenerID;
@@ -331,6 +332,8 @@
{
Server s = servers[i].getServer();
destroyed.add(new Integer(s.getServerID()));
+
+ log.info("Killing spawned server " + i);
try
{
@@ -666,6 +669,14 @@
insureStarted(serverIndex);
Server poisoned = servers[serverIndex].getServer();
+ //We set the server to null so it can be recreated again, but ONLY for those poisons that cause the server to get killed
+ //We do not do this for other poisons that don't
+
+ if (type != PoisonInterceptor.LONG_SEND && type != PoisonInterceptor.NULL)
+ {
+ servers[serverIndex] = null;
+ }
+
poisoned.poisonTheServer(type);
return poisoned;
More information about the jboss-cvs-commits
mailing list