summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2009-08-13 16:40:20 +0000
committerMartin Ritchie <ritchiem@apache.org>2009-08-13 16:40:20 +0000
commit50084def8309c02b4c646670cf1b4d1fe161ddd7 (patch)
treecba6845cb6176b5e4e2d3dc010e4b8413d860db0
parent943387fd1525350addddf850cec3082ad0c9cd41 (diff)
downloadqpid-python-50084def8309c02b4c646670cf1b4d1fe161ddd7.tar.gz
QTC: Removed nukeBroker() as it is not functionally different from stopBroker()
Completely commented out tests in PST that are not possible. i.e. gracefull broker shutdown and the final test that did nothing other than leave 100 msgs on the queue. Also updated queue naming to use QTC.getTestQueueName() git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@803944 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java70
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java28
2 files changed, 34 insertions, 64 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java
index cd5a48d0af..ac07372c68 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java
@@ -45,7 +45,7 @@ public class PersistentStoreTest extends QpidTestCase
_con = getConnection();
_con.start();
_session = _con.createSession(true, Session.AUTO_ACKNOWLEDGE);
- _destination = _session.createQueue(this.getClass().getName());
+ _destination = _session.createQueue(getTestQueueName());
_consumer = _session.createConsumer(_destination);
_consumer.close();
@@ -70,16 +70,16 @@ public class PersistentStoreTest extends QpidTestCase
assertNull("No more messages should be received", _consumer.receive(100));
}
- /**
- * starts the server, sends 100 messages, restarts the server and gets 100 messages back
- * the test formerly referred to as BDB-Qpid-1
- * @throws Exception
- */
- public void testStartStop() throws Exception
- {
- restartBroker();
- checkMessages();
- }
+// /**
+// * starts the server, sends 100 messages, restarts the server and gets 100 messages back
+// * the test formerly referred to as BDB-Qpid-1
+// * @throws Exception
+// */
+// public void testStartStop() throws Exception
+// {
+// restartBroker(); -- Not Currently a gracefull restart so not BDB-Qpid-1
+// checkMessages();
+// }
/**
@@ -89,24 +89,23 @@ public class PersistentStoreTest extends QpidTestCase
*/
public void testForcibleStartStop() throws Exception
{
- nukeBroker();
- startBroker();
- checkMessages();
- }
-
- /**
- * starts the server, sends 100 committed messages, 5 uncommited ones,
- * restarts the server and gets 100 messages back
- * the test formerly referred to as BDB-Qpid-5
- * @throws Exception
- */
- public void testStartStopMidTransaction() throws Exception
- {
- sendMessage(_session, _destination, 5);
restartBroker();
checkMessages();
}
+// /**
+// * starts the server, sends 100 committed messages, 5 uncommited ones,
+// * restarts the server and gets 100 messages back
+// * the test formerly referred to as BDB-Qpid-5
+// * @throws Exception
+// */
+// public void testStartStopMidTransaction() throws Exception
+// {
+// sendMessage(_session, _destination, 5);
+// restartBroker(); -- Not Currently a gracefull restart so not BDB-Qpid-1
+// checkMessages();
+// }
+
/**
* starts the server, sends 100 committed messages, 5 uncommited ones,
* nukes and starts the server and gets 100 messages back
@@ -116,8 +115,7 @@ public class PersistentStoreTest extends QpidTestCase
public void testForcibleStartStopMidTransaction() throws Exception
{
sendMessage(_session, _destination, 5);
- nukeBroker();
- startBroker();
+ restartBroker();
checkMessages();
}
@@ -136,14 +134,14 @@ public class PersistentStoreTest extends QpidTestCase
checkMessages();
}
- /**
- * starts the server, sends 50 committed messages, copies $QPID_WORK to a new location,
- * sends 10 messages, stops the server, nukes the store, restores the copy, starts the server
- * checks that we get the first 50 back.
- */
- public void testHotBackup()
- {
-
- }
+// /**
+// * starts the server, sends 50 committed messages, copies $QPID_WORK to a new location,
+// * sends 10 messages, stops the server, nukes the store, restores the copy, starts the server
+// * checks that we get the first 50 back.
+// */
+// public void testHotBackup()
+// {
+// -- removing as this will leave 100msgs on a queue
+// }
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
index b6ee6083b2..e7218d6975 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
@@ -521,34 +521,6 @@ public class QpidTestCase extends TestCase
}
}
- public void nukeBroker() throws Exception
- {
- nukeBroker(0);
- }
-
- public void nukeBroker(int port) throws Exception
- {
- Process proc = _brokers.get(getPort(port));
- if (proc == null)
- {
- stopBroker(port);
- }
- else
- {
- String command = "pkill -KILL -f " + getBrokerCommand(getPort(port));
- try
- {
- Runtime.getRuntime().exec(command);
- }
- catch (Exception e)
- {
- // Can't do that, try the old fashioned way
- _logger.warn("Could not run " + command + ", killing with stopBroker()");
- stopBroker(port);
- }
- }
- }
-
/**
* Attempt to set the Java Broker to use the BDBMessageStore for persistence
* Falling back to the DerbyMessageStore if