You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2009/08/13 18:40:20 UTC

svn commit: r803944 - in /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid: server/store/PersistentStoreTest.java test/utils/QpidTestCase.java

Author: ritchiem
Date: Thu Aug 13 16:40:20 2009
New Revision: 803944

URL: http://svn.apache.org/viewvc?rev=803944&view=rev
Log:
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()

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java?rev=803944&r1=803943&r2=803944&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/store/PersistentStoreTest.java Thu Aug 13 16:40:20 2009
@@ -45,7 +45,7 @@
         _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 @@
         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 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 void testForcibleStartStopMidTransaction() throws Exception
     {
         sendMessage(_session, _destination, 5);
-        nukeBroker();
-        startBroker();
+        restartBroker();
         checkMessages();
     }
 
@@ -136,14 +134,14 @@
         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
+//    }
     
 }

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=803944&r1=803943&r2=803944&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java Thu Aug 13 16:40:20 2009
@@ -521,34 +521,6 @@
         }
     }
 
-    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



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org