Author: rupertlssmith
Date: Tue Oct  2 03:00:35 2007
New Revision: 581176

URL: http://svn.apache.org/viewvc?rev=581176&view=rev
Log:
Fixed broken build by updating junit-toolkit references.

Modified:
    incubator/qpid/trunk/qpid/java/perftests/distribution/pom.xml
    incubator/qpid/trunk/qpid/java/pom.xml
    
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java
    
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
    
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java

Modified: incubator/qpid/trunk/qpid/java/perftests/distribution/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/perftests/distribution/pom.xml?rev=581176&r1=581175&r2=581176&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/perftests/distribution/pom.xml (original)
+++ incubator/qpid/trunk/qpid/java/perftests/distribution/pom.xml Tue Oct  2 
03:00:35 2007
@@ -56,13 +56,13 @@
         <dependency>
             <groupId>uk.co.thebadgerset</groupId>
             <artifactId>junit-toolkit</artifactId>
-            <version>0.5</version>
+            <version>0.6-SNAPSHOT</version>
             <scope>runtime</scope>
             </dependency>
         <dependency>
             <groupId>uk.co.thebadgerset</groupId>
             <artifactId>junit-toolkit-maven-plugin</artifactId>
-            <version>0.5</version>
+            <version>0.6-SNAPSHOT</version>
             <scope>runtime</scope>
         </dependency>
     </dependencies>

Modified: incubator/qpid/trunk/qpid/java/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/pom.xml?rev=581176&r1=581175&r2=581176&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/pom.xml (original)
+++ incubator/qpid/trunk/qpid/java/pom.xml Tue Oct  2 03:00:35 2007
@@ -399,7 +399,7 @@
                 <plugin>
                     <groupId>uk.co.thebadgerset</groupId>
                     <artifactId>junit-toolkit-maven-plugin</artifactId>
-                    <version>0.5</version>
+                    <version>0.6-SNAPSHOT</version>
                 </plugin>
 
             <!-- Disabled as plugin crashes on the systest module. 

Modified: 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java?rev=581176&r1=581175&r2=581176&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/TestUtils.java
 Tue Oct  2 03:00:35 2007
@@ -26,16 +26,13 @@
 
 import uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
 
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
+import javax.jms.*;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
-import java.util.Properties;
 import java.util.Map;
+import java.util.Properties;
 
 /**
  * TestUtils provides static helper methods that are usefull for writing tests 
against QPid.
@@ -51,6 +48,10 @@
     /** Used for debugging. */
     private static Logger log = Logger.getLogger(TestUtils.class);
 
+    private static byte[] MESSAGE_DATA_BYTES =
+        "Test Message -- Test Message -- Test Message -- Test Message -- Test 
Message -- Test Message -- Test Message -- "
+        .getBytes();
+
     /**
      * Establishes a JMS connection using a set of properties and qpids built 
in JNDI implementation. This is a simple
      * convenience method for code that does not anticipate handling 
connection failures. All exceptions that indicate
@@ -96,9 +97,8 @@
             Context ctx = new InitialContext(messagingProps);
 
             ConnectionFactory cf = (ConnectionFactory) 
ctx.lookup(CONNECTION_NAME);
-            Connection connection = cf.createConnection();
 
-            return connection;
+            return cf.createConnection();
         }
         catch (NamingException e)
         {
@@ -108,6 +108,39 @@
         {
             throw new RuntimeException("Could not establish connection due to 
JMSException.", e);
         }
+    }
+
+    /**
+     * Creates a test message of the specified size, on the given JMS session.
+     *
+     * @param session The JMS session.
+     * @param size    The size of the message in bytes.
+     *
+     * @return A bytes message, of the specified size, filled with dummy data.
+     *
+     *
+     */
+    public static Message createTestMessageOfSize(Session session, int size) 
throws JMSException
+    {
+        BytesMessage message = session.createBytesMessage();
+
+        if (size > 0)
+        {
+            int div = MESSAGE_DATA_BYTES.length / size;
+            int mod = MESSAGE_DATA_BYTES.length % size;
+
+            for (int i = 0; i < div; i++)
+            {
+                message.writeBytes(MESSAGE_DATA_BYTES);
+            }
+
+            if (mod != 0)
+            {
+                message.writeBytes(MESSAGE_DATA_BYTES, 0, mod);
+            }
+        }
+
+        return message;
     }
 
     /**

Modified: 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java?rev=581176&r1=581175&r2=581176&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
 Tue Oct  2 03:00:35 2007
@@ -32,14 +32,11 @@
 import org.apache.qpid.test.framework.TestClientDetails;
 import org.apache.qpid.test.framework.TestUtils;
 import org.apache.qpid.test.framework.clocksynch.UDPClockReference;
-import org.apache.qpid.test.framework.listeners.XMLTestListener;
 import org.apache.qpid.util.ConversationFactory;
 import org.apache.qpid.util.PrettyPrintingUtils;
 
-import uk.co.thebadgerset.junit.extensions.TKTestResult;
 import uk.co.thebadgerset.junit.extensions.TKTestRunner;
 import uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
-import uk.co.thebadgerset.junit.extensions.listeners.CSVTestListener;
 import uk.co.thebadgerset.junit.extensions.util.CommandLineParser;
 import uk.co.thebadgerset.junit.extensions.util.MathUtils;
 import uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
@@ -47,7 +44,6 @@
 
 import javax.jms.*;
 
-import java.io.*;
 import java.net.InetAddress;
 import java.util.*;
 import java.util.concurrent.LinkedBlockingQueue;
@@ -111,12 +107,6 @@
     /** Holds the connection that the coordinating messages are sent over. */
     protected Connection connection;
 
-    /**
-     * Holds the name of the class of the test currently being run. Ideally 
passed into the [EMAIL PROTECTED] #createTestResult}
-     * method, but as the signature is already fixed for this, the current 
value gets pushed here as a member variable.
-     */
-    protected String currentTestClassName;
-
     /** Holds the path of the directory to output test results too, if one is 
defined. */
     protected String reportDir;
 
@@ -126,12 +116,6 @@
     /** Flag that indicates that all test clients should be terminated upon 
completion of the test cases. */
     protected boolean terminate;
 
-    /** Flag that indicates the CSV results listener should be used to output 
results. */
-    protected boolean csvResults;
-
-    /** Flag that indiciates the XML results listener should be used to output 
results. */
-    protected boolean xmlResults;
-
     /**
      * Creates an interop test coordinator on the specified broker and virtual 
host.
      *
@@ -170,8 +154,6 @@
         this.reportDir = reportDir;
         this.engine = engine;
         this.terminate = terminate;
-        this.csvResults = csv;
-        this.xmlResults = xml;
     }
 
     /**
@@ -546,88 +528,5 @@
         default:
             return new InteropTestDecorator(targetTest, enlistedClients, 
conversationFactory, connection);
         }
-    }
-
-    /**
-     * Creates the TestResult object to be used for test runs.
-     *
-     * @return An instance of the test result object.
-     */
-    protected TestResult createTestResult()
-    {
-        log.debug("protected TestResult createTestResult(): called");
-
-        TKTestResult result = new TKTestResult(fPrinter.getWriter(), delay, 
verbose, testCaseName);
-
-        // Check if a directory to output reports to has been specified and 
attach test listeners if so.
-        if (reportDir != null)
-        {
-            // Create the report directory if it does not already exist.
-            File reportDirFile = new File(reportDir);
-
-            if (!reportDirFile.exists())
-            {
-                reportDirFile.mkdir();
-            }
-
-            // Create the results file (make the name of this configurable as 
a command line parameter).
-            Writer timingsWriter;
-
-            // Set up an XML results listener to output the timings to the 
results file, if requested on the command line.
-            if (xmlResults)
-            {
-                try
-                {
-                    File timingsFile = new File(reportDirFile, "TEST." + 
currentTestClassName + ".xml");
-                    timingsWriter = new BufferedWriter(new 
FileWriter(timingsFile), 20000);
-                }
-                catch (IOException e)
-                {
-                    throw new RuntimeException("Unable to create the log file 
to write test results to: " + e, e);
-                }
-
-                XMLTestListener listener = new XMLTestListener(timingsWriter, 
currentTestClassName);
-                result.addListener(listener);
-                result.addTKTestListener(listener);
-
-                registerShutdownHook(listener);
-            }
-
-            // Set up an CSV results listener to output the timings to the 
results file, if requested on the command line.
-            if (csvResults)
-            {
-                try
-                {
-                    File timingsFile =
-                        new File(reportDirFile, testRunName + "-" + 
TIME_STAMP_FORMAT.format(new Date()) + "-timings.csv");
-                    timingsWriter = new BufferedWriter(new 
FileWriter(timingsFile), 20000);
-                }
-                catch (IOException e)
-                {
-                    throw new RuntimeException("Unable to create the log file 
to write test results to: " + e, e);
-                }
-
-                CSVTestListener listener = new CSVTestListener(timingsWriter);
-                result.addListener(listener);
-                result.addTKTestListener(listener);
-
-                // Register the results listeners shutdown hook to flush its 
data if the test framework is shutdown
-                // prematurely.
-                registerShutdownHook(listener);
-            }
-
-            // Register the results listeners shutdown hook to flush its data 
if the test framework is shutdown
-            // prematurely.
-            // registerShutdownHook(listener);
-
-            // Record the start time of the batch.
-            // result.notifyStartBatch();
-
-            // At this point in time the test class has been instantiated, 
giving it an opportunity to read its parameters.
-            // Inform any test listers of the test properties.
-            
result.notifyTestProperties(TestContextProperties.getAccessedProps());
-        }
-
-        return result;
     }
 }

Modified: 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java?rev=581176&r1=581175&r2=581176&view=diff
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/LocalCircuitImpl.java
 Tue Oct  2 03:00:35 2007
@@ -401,7 +401,7 @@
         }
 
         // Inject a short pause to allow time for exceptions to come back 
asynchronously.
-        TestUtils.pause(100L);
+        TestUtils.pause(500L);
 
         // Request a status report.
         check();


Reply via email to