summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRupert Smith <rupertlssmith@apache.org>2007-07-25 13:57:21 +0000
committerRupert Smith <rupertlssmith@apache.org>2007-07-25 13:57:21 +0000
commitb960cd5acbb26aa7b228e234204e4af1092d759a (patch)
tree742c00b4231ad97becb8c81e9fac37ef8960efa1
parentdb75997fdddebb33087c87f273b4c79064f60614 (diff)
downloadqpid-python-b960cd5acbb26aa7b228e234204e4af1092d759a.tar.gz
Refactored packaging of test framework.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@559458 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/integrationtests/docs/RunningSustainedTests.txt2
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase1DummyRun.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase1DummyRun.java)4
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase2BasicP2P.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase2BasicP2P.java)6
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase3BasicPubSub.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase3BasicPubSub.java)6
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/CircuitTestCase.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/CircuitTestCase.java)4
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase1DummyRun.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase1DummyRun.java)6
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase2BasicP2P.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase2BasicP2P.java)4
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase3BasicPubSub.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase3BasicPubSub.java)4
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedClientTestCase.java4
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedTestCase.java7
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/InteropClientTestCase.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/InteropClientTestCase.java)2
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java (renamed from java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/TestClient.java)10
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/util/ClasspathScanner.java234
-rw-r--r--java/integrationtests/src/main/java/org/apache/qpid/util/ConversationFactory.java479
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/exchange/ImmediateMessageTest.java2
-rw-r--r--java/systests/src/main/java/org/apache/qpid/server/exchange/MandatoryMessageTest.java2
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/DropInTest.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/DropInTest.java)2
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java7
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/MultiProducerConsumerPairImpl.java81
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/TestClientDetails.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/TestClientDetails.java)2
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/distributedcircuit/DistributedCircuitImpl.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/distributedcircuit/DistributedCircuitImpl.java)2
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/Coordinator.java)4
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/DistributedTestCase.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/DistributedTestCase.java)8
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/DistributedTestDecorator.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/DistributedTestDecorator.java)9
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/FanOutTestDecorator.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/FanOutTestDecorator.java)9
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/InteropTestDecorator.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/InteropTestDecorator.java)7
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/OptOutTestCase.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/OptOutTestCase.java)8
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/listeners/XMLTestListener.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/XMLTestListener.java)2
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/CircuitImpl.java (renamed from java/systests/src/main/java/org/apache/qpid/test/framework/CircuitImpl.java)8
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/PublisherImpl.java (renamed from java/systests/src/main/java/org/apache/qpid/test/framework/PublisherImpl.java)6
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/ReceiverImpl.java (renamed from java/systests/src/main/java/org/apache/qpid/test/framework/ReceiverImpl.java)9
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/BaseDistributedTestSequencer.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/BaseDistributedTestSequencer.java)6
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/DistributedTestSequencer.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/DistributedTestSequencer.java)6
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/FanOutTestSequencer.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/FanOutTestSequencer.java)4
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/InteropTestSequencer.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/InteropTestSequencer.java)4
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/TestCaseSequencer.java (renamed from java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/TestCaseSequencer.java)2
36 files changed, 87 insertions, 875 deletions
diff --git a/java/integrationtests/docs/RunningSustainedTests.txt b/java/integrationtests/docs/RunningSustainedTests.txt
index c483709f61..db4405a32d 100644
--- a/java/integrationtests/docs/RunningSustainedTests.txt
+++ b/java/integrationtests/docs/RunningSustainedTests.txt
@@ -9,7 +9,7 @@ Run the tests as per the integration tests.
- Start a broker
- Start at least one test client [java org.apache.qpid.interop.TestClient], ensuring unique naming.
-- Start the test coordinator with the 'fanout' engine, on the sustained test case [java org.apache.qpid.interop.coordinator.Coordinator]
+- Start the test coordinator with the 'fanout' engine, on the sustained test case [java org.apache.qpid.test.framework.distributedtesting.Coordinator]
- Additional Test clients can be started and joined into the running test: [java org.apache.qpid.interop.TestClient -j]
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase1DummyRun.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase1DummyRun.java
index a8edeef80e..b119d13a3d 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase1DummyRun.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase1DummyRun.java
@@ -18,11 +18,11 @@
* under the License.
*
*/
-package org.apache.qpid.interop.testclient.testcases;
+package org.apache.qpid.interop.clienttestcases;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.testclient.InteropClientTestCase;
+import org.apache.qpid.test.framework.distributedtesting.InteropClientTestCase;
import javax.jms.JMSException;
import javax.jms.Message;
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase2BasicP2P.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase2BasicP2P.java
index 823ed51596..080bd846ee 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase2BasicP2P.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase2BasicP2P.java
@@ -18,12 +18,12 @@
* under the License.
*
*/
-package org.apache.qpid.interop.testclient.testcases;
+package org.apache.qpid.interop.clienttestcases;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.testclient.InteropClientTestCase;
-import org.apache.qpid.interop.testclient.TestClient;
+import org.apache.qpid.test.framework.distributedtesting.InteropClientTestCase;
+import org.apache.qpid.test.framework.distributedtesting.TestClient;
import org.apache.qpid.test.framework.TestUtils;
import javax.jms.*;
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase3BasicPubSub.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase3BasicPubSub.java
index 4cdb07c546..a11d045e89 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/testcases/TestCase3BasicPubSub.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/clienttestcases/TestCase3BasicPubSub.java
@@ -18,12 +18,12 @@
* under the License.
*
*/
-package org.apache.qpid.interop.testclient.testcases;
+package org.apache.qpid.interop.clienttestcases;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.testclient.InteropClientTestCase;
-import org.apache.qpid.interop.testclient.TestClient;
+import org.apache.qpid.test.framework.distributedtesting.InteropClientTestCase;
+import org.apache.qpid.test.framework.distributedtesting.TestClient;
import org.apache.qpid.test.framework.TestUtils;
import javax.jms.*;
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/CircuitTestCase.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/CircuitTestCase.java
index 81a3e891fd..966a545e16 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/CircuitTestCase.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/CircuitTestCase.java
@@ -18,11 +18,11 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.testcases;
+package org.apache.qpid.interop.testcases;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.sequencers.TestCaseSequencer;
+import org.apache.qpid.test.framework.sequencers.TestCaseSequencer;
import org.apache.qpid.test.framework.Circuit;
import org.apache.qpid.test.framework.FrameworkBaseCase;
import org.apache.qpid.test.framework.MessagingTestConfigProperties;
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase1DummyRun.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase1DummyRun.java
index 075d5ecad4..73e08b578e 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase1DummyRun.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase1DummyRun.java
@@ -18,11 +18,11 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.testcases;
+package org.apache.qpid.interop.testcases;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.DistributedTestCase;
+import org.apache.qpid.test.framework.distributedtesting.DistributedTestCase;
import java.util.Properties;
@@ -33,7 +33,7 @@ import java.util.Properties;
* <p><table id="crc"><caption>CRC Card</caption>
* <tr><th> Responsibilities <th> Collaborations
* <tr><td> Exercises the interop testing framework without actually sending any test messages.
- * <td> {@link org.apache.qpid.interop.coordinator.DistributedTestCase}
+ * <td> {@link org.apache.qpid.test.framework.distributedtesting.DistributedTestCase}
* </table>
*/
public class InteropTestCase1DummyRun extends DistributedTestCase
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase2BasicP2P.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase2BasicP2P.java
index 1b75a13712..f77bbf032f 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase2BasicP2P.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase2BasicP2P.java
@@ -18,11 +18,11 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.testcases;
+package org.apache.qpid.interop.testcases;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.DistributedTestCase;
+import org.apache.qpid.test.framework.distributedtesting.DistributedTestCase;
import java.util.Properties;
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase3BasicPubSub.java b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase3BasicPubSub.java
index 6d4db4c13c..ad27ca63bd 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/coordinator/testcases/InteropTestCase3BasicPubSub.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/interop/testcases/InteropTestCase3BasicPubSub.java
@@ -18,11 +18,11 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.testcases;
+package org.apache.qpid.interop.testcases;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.DistributedTestCase;
+import org.apache.qpid.test.framework.distributedtesting.DistributedTestCase;
import java.util.Properties;
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedClientTestCase.java b/java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedClientTestCase.java
index edc6fdba1e..65e05fab4b 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedClientTestCase.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedClientTestCase.java
@@ -24,8 +24,8 @@ import org.apache.log4j.Logger;
import org.apache.qpid.client.AMQNoConsumersException;
import org.apache.qpid.client.AMQNoRouteException;
-import org.apache.qpid.interop.testclient.TestClient;
-import org.apache.qpid.interop.testclient.testcases.TestCase3BasicPubSub;
+import org.apache.qpid.test.framework.distributedtesting.TestClient;
+import org.apache.qpid.interop.clienttestcases.TestCase3BasicPubSub;
import org.apache.qpid.test.framework.TestUtils;
import javax.jms.Connection;
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedTestCase.java b/java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedTestCase.java
index 84852078f0..36f9b4eaf1 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedTestCase.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/sustained/SustainedTestCase.java
@@ -23,9 +23,8 @@ package org.apache.qpid.sustained;
import org.apache.log4j.Logger;
import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.interop.coordinator.DistributedTestCase;
-import org.apache.qpid.interop.coordinator.DropInTest;
-import org.apache.qpid.interop.coordinator.TestClientDetails;
+import org.apache.qpid.test.framework.distributedtesting.DistributedTestCase;
+import org.apache.qpid.test.framework.DropInTest;
import javax.jms.JMSException;
import javax.jms.Message;
@@ -33,7 +32,7 @@ import javax.jms.Message;
import java.util.Properties;
/**
- * SustainedTestCase is a {@link org.apache.qpid.interop.coordinator.DistributedTestCase} that runs the "Perf_SustainedPubSub" test case. This consists of one
+ * SustainedTestCase is a {@link org.apache.qpid.test.framework.distributedtesting.DistributedTestCase} that runs the "Perf_SustainedPubSub" test case. This consists of one
* test client sending, and several receiving, and attempts to find the highest rate at which messages can be broadcast
* to the receivers. It is also a {@link DropInTest} to which more test clients may be added during a test run.
*
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/InteropClientTestCase.java b/java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/InteropClientTestCase.java
index 216efd3aff..5e6d61a9e0 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/InteropClientTestCase.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/InteropClientTestCase.java
@@ -18,7 +18,7 @@
* under the License.
*
*/
-package org.apache.qpid.interop.testclient;
+package org.apache.qpid.test.framework.distributedtesting;
import javax.jms.JMSException;
import javax.jms.Message;
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/TestClient.java b/java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java
index 26b00aa442..12c0d0aa69 100644
--- a/java/integrationtests/src/main/java/org/apache/qpid/interop/testclient/TestClient.java
+++ b/java/integrationtests/src/main/java/org/apache/qpid/test/framework/distributedtesting/TestClient.java
@@ -18,13 +18,13 @@
* under the License.
*
*/
-package org.apache.qpid.interop.testclient;
+package org.apache.qpid.test.framework.distributedtesting;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.testclient.testcases.TestCase1DummyRun;
-import org.apache.qpid.interop.testclient.testcases.TestCase2BasicP2P;
-import org.apache.qpid.interop.testclient.testcases.TestCase3BasicPubSub;
+import org.apache.qpid.interop.clienttestcases.TestCase1DummyRun;
+import org.apache.qpid.interop.clienttestcases.TestCase2BasicP2P;
+import org.apache.qpid.interop.clienttestcases.TestCase3BasicPubSub;
import org.apache.qpid.sustained.SustainedClientTestCase;
import org.apache.qpid.test.framework.MessagingTestConfigProperties;
import org.apache.qpid.test.framework.TestUtils;
@@ -43,7 +43,7 @@ import java.util.Map;
/**
* Implements a test client as described in the interop testing spec
* (http://cwiki.apache.org/confluence/display/qpid/Interop+Testing+Specification). A test client is an agent that
- * reacts to control message sequences send by the test {@link org.apache.qpid.interop.coordinator.Coordinator}.
+ * reacts to control message sequences send by the test {@link org.apache.qpid.test.framework.distributedtesting.Coordinator}.
*
* <p/><table><caption>Messages Handled by SustainedTestClient</caption>
* <tr><th> Message <th> Action
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/util/ClasspathScanner.java b/java/integrationtests/src/main/java/org/apache/qpid/util/ClasspathScanner.java
deleted file mode 100644
index bad49060ca..0000000000
--- a/java/integrationtests/src/main/java/org/apache/qpid/util/ClasspathScanner.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.util;
-
-import java.io.File;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.log4j.Logger;
-
-/**
- * An ClasspathScanner scans the classpath for classes that implement an interface or extend a base class and have names
- * that match a regular expression.
- *
- * <p/>In order to test whether a class implements an interface or extends a class, the class must be loaded (unless
- * the class files were to be scanned directly). Using this collector can cause problems when it scans the classpath,
- * because loading classes will initialize their statics, which in turn may cause undesired side effects. For this
- * reason, the collector should always be used with a regular expression, through which the class file names are
- * filtered, and only those that pass this filter will be tested. For example, if you define tests in classes that
- * end with the keyword "Test" then use the regular expression "Test$" to match this.
- *
- * <p><table id="crc"><caption>CRC Card</caption>
- * <tr><th> Responsibilities <th> Collaborations
- * <tr><td> Find all classes matching type and name pattern on the classpath.
- * </table>
- *
- * @todo Add logic to scan jars as well as directories.
- */
-public class ClasspathScanner
-{
- private static final Logger log = Logger.getLogger(ClasspathScanner.class);
-
- /**
- * Scans the classpath and returns all classes that extend a specified class and match a specified name.
- * There is an flag that can be used to indicate that only Java Beans will be matched (that is, only those classes
- * that have a default constructor).
- *
- * @param matchingClass The class or interface to match.
- * @param matchingRegexp The regular expression to match against the class name.
- * @param beanOnly Flag to indicate that onyl classes with default constructors should be matched.
- *
- * @return All the classes that match this collector.
- */
- public static <T> Collection<Class<? extends T>> getMatches(Class<T> matchingClass, String matchingRegexp,
- boolean beanOnly)
- {
- log.debug("public static <T> Collection<Class<? extends T>> getMatches(Class<T> matchingClass = " + matchingClass
- + ", String matchingRegexp = " + matchingRegexp + ", boolean beanOnly = " + beanOnly + "): called");
-
- // Build a compiled regular expression from the pattern to match.
- Pattern matchPattern = Pattern.compile(matchingRegexp);
-
- String classPath = System.getProperty("java.class.path");
- Map<String, Class<? extends T>> result = new HashMap<String, Class<? extends T>>();
-
- log.debug("classPath = " + classPath);
-
- // Find matching classes starting from all roots in the classpath.
- for (String path : splitClassPath(classPath))
- {
- gatherFiles(new File(path), "", result, matchPattern, matchingClass);
- }
-
- return result.values();
- }
-
- /**
- * Finds all matching classes rooted at a given location in the file system. If location is a directory it
- * is recursively examined.
- *
- * @param classRoot The root of the current point in the file system being examined.
- * @param classFileName The name of the current file or directory to examine.
- * @param result The accumulated mapping from class names to classes that match the scan.
- *
- * @todo Recursion ok as file system depth is not likely to exhaust the stack. Might be better to replace with
- * iteration.
- */
- private static <T> void gatherFiles(File classRoot, String classFileName, Map<String, Class<? extends T>> result,
- Pattern matchPattern, Class<? extends T> matchClass)
- {
- log.debug("private static <T> void gatherFiles(File classRoot = " + classRoot + ", String classFileName = "
- + classFileName + ", Map<String, Class<? extends T>> result, Pattern matchPattern = " + matchPattern
- + ", Class<? extends T> matchClass = " + matchClass + "): called");
-
- File thisRoot = new File(classRoot, classFileName);
-
- // If the current location is a file, check if it is a matching class.
- if (thisRoot.isFile())
- {
- // Check that the file has a matching name.
- if (matchesName(thisRoot.getName(), matchPattern))
- {
- String className = classNameFromFile(thisRoot.getName());
-
- // Check that the class has matching type.
- try
- {
- Class<?> candidateClass = Class.forName(className);
-
- Class matchedClass = matchesClass(candidateClass, matchClass);
-
- if (matchedClass != null)
- {
- result.put(className, matchedClass);
- }
- }
- catch (ClassNotFoundException e)
- {
- // Ignore this. The matching class could not be loaded.
- log.debug("Got ClassNotFoundException, ignoring.", e);
- }
- }
-
- return;
- }
- // Otherwise the current location is a directory, so examine all of its contents.
- else
- {
- String[] contents = thisRoot.list();
-
- if (contents != null)
- {
- for (String content : contents)
- {
- gatherFiles(classRoot, classFileName + File.separatorChar + content, result, matchPattern, matchClass);
- }
- }
- }
- }
-
- /**
- * Checks if the specified class file name corresponds to a class with name matching the specified regular expression.
- *
- * @param classFileName The class file name.
- * @param matchPattern The regular expression pattern to match.
- *
- * @return <tt>true</tt> if the class name matches, <tt>false</tt> otherwise.
- */
- private static boolean matchesName(String classFileName, Pattern matchPattern)
- {
- String className = classNameFromFile(classFileName);
- Matcher matcher = matchPattern.matcher(className);
-
- return matcher.matches();
- }
-
- /**
- * Checks if the specified class to compare extends the base class being scanned for.
- *
- * @param matchingClass The base class to match against.
- * @param toMatch The class to match against the base class.
- *
- * @return The class to check, cast as an instance of the class to match if the class extends the base class, or
- * <tt>null</tt> otherwise.
- */
- private static <T> Class<? extends T> matchesClass(Class<?> matchingClass, Class<? extends T> toMatch)
- {
- try
- {
- return matchingClass.asSubclass(toMatch);
- }
- catch (ClassCastException e)
- {
- return null;
- }
- }
-
- /**
- * Takes a classpath (which is a series of paths) and splits it into its component paths.
- *
- * @param classPath The classpath to split.
- *
- * @return A list of the component paths that make up the class path.
- */
- private static List<String> splitClassPath(String classPath)
- {
- List<String> result = new LinkedList<String>();
- String separator = System.getProperty("path.separator");
- StringTokenizer tokenizer = new StringTokenizer(classPath, separator);
-
- while (tokenizer.hasMoreTokens())
- {
- result.add(tokenizer.nextToken());
- }
-
- return result;
- }
-
- /**
- * Translates from the filename of a class to its fully qualified classname. Files are named using forward slash
- * seperators and end in ".class", whereas fully qualified class names use "." sperators and no ".class" ending.
- *
- * @param classFileName The filename of the class to translate to a class name.
- *
- * @return The fully qualified class name.
- */
- private static String classNameFromFile(String classFileName)
- {
- log.debug("private static String classNameFromFile(String classFileName = " + classFileName + "): called");
-
- // Remove the .class ending.
- String s = classFileName.substring(0, classFileName.length() - ".class".length());
-
- // Turn / seperators in . seperators.
- String s2 = s.replace(File.separatorChar, '.');
-
- // Knock off any leading . caused by a leading /.
- if (s2.startsWith("."))
- {
- return s2.substring(1);
- }
-
- return s2;
- }
-}
diff --git a/java/integrationtests/src/main/java/org/apache/qpid/util/ConversationFactory.java b/java/integrationtests/src/main/java/org/apache/qpid/util/ConversationFactory.java
deleted file mode 100644
index 0090bec3d0..0000000000
--- a/java/integrationtests/src/main/java/org/apache/qpid/util/ConversationFactory.java
+++ /dev/null
@@ -1,479 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.util;
-
-import org.apache.log4j.Logger;
-
-import javax.jms.*;
-
-import java.util.*;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-/**
- * A conversation helper, uses a message correlation id pattern to match up sent and received messages as a conversation
- * over JMS messaging. Incoming message traffic is divided up by correlation id. Each id has a queue (behaviour dependant
- * on the queue implementation). Clients of this de-multiplexer can wait on messages, defined by message correlation ids.
- *
- * <p/>One use of this is as a conversation synchronizer where multiple threads are carrying out conversations over a
- * multiplexed messaging route. This can be usefull, as JMS sessions are not multi-threaded. Setting up the conversation
- * with synchronous queues will allow these threads to be written in a synchronous style, but with their execution order
- * governed by the asynchronous message flow. For example, something like the following code could run a multi-threaded
- * conversation (the conversation methods can be called many times in parallel):
- *
- * <p/><pre>
- * class Initiator
- * {
- * ConversationHelper conversation = new ConversationHelper(connection, null,
- * java.util.concurrent.LinkedBlockingQueue.class);
- *
- * initiateConversation()
- * {
- * try {
- * // Exchange greetings.
- * conversation.send(sendDestination, conversation.getSession().createTextMessage("Hello."));
- * Message greeting = conversation.receive();
- *
- * // Exchange goodbyes.
- * conversation.send(conversation.getSession().createTextMessage("Goodbye."));
- * Message goodbye = conversation.receive();
- * } finally {
- * conversation.end();
- * }
- * }
- * }
- *
- * class Responder
- * {
- * ConversationHelper conversation = new ConversationHelper(connection, receiveDestination,
- * java.util.concurrent.LinkedBlockingQueue.class);
- *
- * respondToConversation()
- * {
- * try {
- * // Exchange greetings.
- * Message greeting = conversation.receive();
- * conversation.send(conversation.getSession().createTextMessage("Hello."));
- *
- * // Exchange goodbyes.
- * Message goodbye = conversation.receive();
- * conversation.send(conversation.getSession().createTextMessage("Goodbye."));
- * } finally {
- * conversation.end();
- * }
- * }
- * }
- * </pre>
- *
- * <p/>Conversation correlation id's are generated on a per thread basis.
- *
- * <p/>The same session is shared amongst all conversations. Calls to send are therefore synchronized because JMS
- * sessions are not multi-threaded.
- *
- * <p/><table id="crc"><caption>CRC Card</caption>
- * <tr><th> Responsibilities <th> Collaborations
- * <tr><th> Associate messages to an ongoing conversation using correlation ids.
- * <tr><td> Auto manage sessions for conversations.
- * <tr><td> Store messages not in a conversation in dead letter box.
- * </table>
- */
-public class ConversationFactory
-{
- /** Used for debugging. */
- private static final Logger log = Logger.getLogger(ConversationFactory.class);
-
- /** Holds a map from correlation id's to queues. */
- private Map<Long, BlockingQueue<Message>> idsToQueues = new HashMap<Long, BlockingQueue<Message>>();
-
- /** Holds the connection over which the conversation is conducted. */
- private Connection connection;
-
- /** Holds the session over which the conversation is conduxted. */
- private Session session;
-
- /** The message consumer for incoming messages. */
- MessageConsumer consumer;
-
- /** The message producer for outgoing messages. */
- MessageProducer producer;
-
- /** The well-known or temporary destination to receive replies on. */
- Destination receiveDestination;
-
- /** Holds the queue implementation class for the reply queue. */
- Class<? extends BlockingQueue> queueClass;
-
- /** Used to hold any replies that are received outside of the context of a conversation. */
- BlockingQueue<Message> deadLetterBox = new LinkedBlockingQueue<Message>();
-
- /* Used to hold conversation state on a per thread basis. */
- /*
- ThreadLocal<Conversation> threadLocals =
- new ThreadLocal<Conversation>()
- {
- protected Conversation initialValue()
- {
- Conversation settings = new Conversation();
- settings.conversationId = conversationIdGenerator.getAndIncrement();
-
- return settings;
- }
- };
- */
-
- /** Generates new coversation id's as needed. */
- AtomicLong conversationIdGenerator = new AtomicLong();
-
- /**
- * Creates a conversation helper on the specified connection with the default sending destination, and listening
- * to the specified receiving destination.
- *
- * @param connection The connection to build the conversation helper on.
- * @param receiveDestination The destination to listen to for incoming messages. This may be null to use a temporary
- * queue.
- * @param queueClass The queue implementation class.
- *
- * @throws JMSException All underlying JMSExceptions are allowed to fall through.
- */
- public ConversationFactory(Connection connection, Destination receiveDestination,
- Class<? extends BlockingQueue> queueClass) throws JMSException
- {
- log.debug("public ConversationFactory(Connection connection, Destination receiveDestination = " + receiveDestination
- + ", Class<? extends BlockingQueue> queueClass = " + queueClass + "): called");
-
- this.connection = connection;
- this.queueClass = queueClass;
-
- session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- // Check if a well-known receive destination has been provided, or use a temporary queue if not.
- this.receiveDestination = (receiveDestination != null) ? receiveDestination : session.createTemporaryQueue();
-
- consumer = session.createConsumer(receiveDestination);
- producer = session.createProducer(null);
-
- consumer.setMessageListener(new Receiver());
- }
-
- /**
- * Creates a new conversation context.
- *
- * @return A new conversation context.
- */
- public Conversation startConversation()
- {
- log.debug("public Conversation startConversation(): called");
-
- Conversation conversation = new Conversation();
- conversation.conversationId = conversationIdGenerator.getAndIncrement();
-
- return conversation;
- }
-
- /**
- * Ensures that the reply queue for a conversation exists.
- *
- * @param conversationId The conversation correlation id.
- */
- private void initQueueForId(long conversationId)
- {
- if (!idsToQueues.containsKey(conversationId))
- {
- idsToQueues.put(conversationId, ReflectionUtils.<BlockingQueue>newInstance(queueClass));
- }
- }
-
- /**
- * Clears the dead letter box, returning all messages that were in it.
- *
- * @return All messages in the dead letter box.
- */
- public Collection<Message> emptyDeadLetterBox()
- {
- log.debug("public Collection<Message> emptyDeadLetterBox(): called");
-
- Collection<Message> result = new ArrayList<Message>();
- deadLetterBox.drainTo(result);
-
- return result;
- }
-
- /**
- * Gets the session over which the conversation is conducted.
- *
- * @return The session over which the conversation is conducted.
- */
- public Session getSession()
- {
- // Conversation settings = threadLocals.get();
-
- return session;
- }
-
- /**
- * Used to hold a conversation context. This consists of a correlating id for the conversation, and a reply
- * destination automatically updated to the last received reply-to destination.
- */
- public class Conversation
- {
- /** Holds the correlation id for the context. */
- long conversationId;
-
- /**
- * Holds the send destination for the context. This will automatically be updated to the most recently received
- * reply-to destination.
- */
- Destination sendDestination;
-
- /**
- * Sends a message to the default sending location. The correlation id of the message will be assigned by this
- * method, overriding any previously set value.
- *
- * @param sendDestination The destination to send to. This may be null to use the last received reply-to
- * destination.
- * @param message The message to send.
- *
- * @throws JMSException All undelying JMSExceptions are allowed to fall through. This will also be thrown if no
- * send destination is specified and there is no most recent reply-to destination available
- * to use.
- */
- public void send(Destination sendDestination, Message message) throws JMSException
- {
- log.debug("public void send(Destination sendDestination = " + sendDestination + ", Message message = " + message
- + "): called");
-
- // Conversation settings = threadLocals.get();
- // long conversationId = conversationId;
- message.setJMSCorrelationID(Long.toString(conversationId));
- message.setJMSReplyTo(receiveDestination);
-
- // Ensure that the reply queue for this conversation exists.
- initQueueForId(conversationId);
-
- // Check if an overriding send to destination has been set or use the last reply-to if not.
- Destination sendTo = null;
-
- if (sendDestination != null)
- {
- sendTo = sendDestination;
- }
- else if (sendDestination != null)
- {
- sendTo = sendDestination;
- }
- else
- {
- throw new JMSException("The send destination was specified, and no most recent reply-to available to use.");
- }
-
- // Send the message.
- synchronized (this)
- {
- producer.send(sendTo, message);
- }
- }
-
- /**
- * Gets the next message in an ongoing conversation. This method may block until such a message is received.
- *
- * @return The next incoming message in the conversation.
- *
- * @throws JMSException All undelying JMSExceptions are allowed to fall through. Thrown if the received message
- * did not have its reply-to destination set up.
- */
- public Message receive() throws JMSException
- {
- log.debug("public Message receive(): called");
-
- // Conversation settings = threadLocals.get();
- // long conversationId = settings.conversationId;
-
- // Ensure that the reply queue for this conversation exists.
- initQueueForId(conversationId);
-
- BlockingQueue<Message> queue = idsToQueues.get(conversationId);
-
- try
- {
- Message result = queue.take();
-
- // Keep the reply-to destination to send replies to.
- sendDestination = result.getJMSReplyTo();
-
- return result;
- }
- catch (InterruptedException e)
- {
- return null;
- }
- }
-
- /**
- * Gets many messages in an ongoing conversation. If a limit is specified, then once that many messages are
- * received they will be returned. If a timeout is specified, then all messages up to the limit, received within
- * that timespan will be returned. At least one of the message count or timeout should be set to a value of
- * 1 or greater.
- *
- * @param num The number of messages to receive, or all if this is less than 1.
- * @param timeout The timeout in milliseconds to receive the messages in, or forever if this is less than 1.
- *
- * @return All messages received within the count limit and the timeout.
- *
- * @throws JMSException All undelying JMSExceptions are allowed to fall through.
- */
- public Collection<Message> receiveAll(int num, long timeout) throws JMSException
- {
- log.debug("public Collection<Message> receiveAll(int num = " + num + ", long timeout = " + timeout
- + "): called");
-
- // Check that a timeout or message count was set.
- if ((num < 1) && (timeout < 1))
- {
- throw new IllegalArgumentException("At least one of message count (num) or timeout must be set.");
- }
-
- // Ensure that the reply queue for this conversation exists.
- initQueueForId(conversationId);
- BlockingQueue<Message> queue = idsToQueues.get(conversationId);
-
- // Used to collect the received messages in.
- Collection<Message> result = new ArrayList<Message>();
-
- // Used to indicate when the timeout or message count has expired.
- boolean receiveMore = true;
-
- int messageCount = 0;
-
- // Receive messages until the timeout or message count expires.
- do
- {
- try
- {
- Message next = null;
-
- // Try to receive the message with a timeout if one has been set.
- if (timeout > 0)
- {
- next = queue.poll(timeout, TimeUnit.MILLISECONDS);
-
- // Check if the timeout expired, and stop receiving if so.
- if (next == null)
- {
- receiveMore = false;
- }
- }
- // Receive the message without a timeout.
- else
- {
- next = queue.take();
- }
-
- // Increment the message count if a message was received.
- messageCount += (next != null) ? 1 : 0;
-
- // Check if all the requested messages were received, and stop receiving if so.
- if ((num > 0) && (messageCount >= num))
- {
- receiveMore = false;
- }
-
- // Keep the reply-to destination to send replies to.
- sendDestination = (next != null) ? next.getJMSReplyTo() : sendDestination;
-
- if (next != null)
- {
- result.add(next);
- }
- }
- catch (InterruptedException e)
- {
- // Restore the threads interrupted status.
- Thread.currentThread().interrupt();
-
- // Stop receiving but return the messages received so far.
- receiveMore = false;
- }
- }
- while (receiveMore);
-
- return result;
- }
-
- /**
- * Completes the conversation. Any correlation id's pertaining to the conversation are no longer valid, and any
- * incoming messages using them will go to the dead letter box.
- */
- public void end()
- {
- log.debug("public void end(): called");
-
- // Ensure that the thread local for the current thread is cleaned up.
- // Conversation settings = threadLocals.get();
- // long conversationId = settings.conversationId;
- // threadLocals.remove();
-
- // Ensure that its queue is removed from the queue map.
- BlockingQueue<Message> queue = idsToQueues.remove(conversationId);
-
- // Move any outstanding messages on the threads conversation id into the dead letter box.
- queue.drainTo(deadLetterBox);
- }
- }
-
- /**
- * Implements the message listener for this conversation handler.
- */
- protected class Receiver implements MessageListener
- {
- /**
- * Handles all incoming messages in the ongoing conversations. These messages are split up by correaltion id
- * and placed into queues.
- *
- * @param message The incoming message.
- */
- public void onMessage(Message message)
- {
- log.debug("public void onMessage(Message message = " + message + "): called");
-
- try
- {
- Long conversationId = Long.parseLong(message.getJMSCorrelationID());
-
- // Find the converstaion queue to place the message on. If there is no conversation for the message id,
- // the the dead letter box queue is used.
- BlockingQueue<Message> queue = idsToQueues.get(conversationId);
- queue = (queue == null) ? deadLetterBox : queue;
-
- queue.put(message);
- }
- catch (JMSException e)
- {
- throw new RuntimeException(e);
- }
- catch (InterruptedException e)
- {
- throw new RuntimeException(e);
- }
- }
- }
-}
diff --git a/java/systests/src/main/java/org/apache/qpid/server/exchange/ImmediateMessageTest.java b/java/systests/src/main/java/org/apache/qpid/server/exchange/ImmediateMessageTest.java
index 6dd0a08198..4a0a27bb06 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/exchange/ImmediateMessageTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/exchange/ImmediateMessageTest.java
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.server.exchange;
-import org.apache.qpid.interop.coordinator.sequencers.TestCaseSequencer;
+import org.apache.qpid.test.framework.sequencers.TestCaseSequencer;
import org.apache.qpid.test.framework.Circuit;
import org.apache.qpid.test.framework.FrameworkBaseCase;
import org.apache.qpid.test.framework.MessagingTestConfigProperties;
diff --git a/java/systests/src/main/java/org/apache/qpid/server/exchange/MandatoryMessageTest.java b/java/systests/src/main/java/org/apache/qpid/server/exchange/MandatoryMessageTest.java
index 987a458121..94a33806d0 100644
--- a/java/systests/src/main/java/org/apache/qpid/server/exchange/MandatoryMessageTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/server/exchange/MandatoryMessageTest.java
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.server.exchange;
-import org.apache.qpid.interop.coordinator.sequencers.TestCaseSequencer;
+import org.apache.qpid.test.framework.sequencers.TestCaseSequencer;
import org.apache.qpid.test.framework.Circuit;
import org.apache.qpid.test.framework.FrameworkBaseCase;
import org.apache.qpid.test.framework.MessagingTestConfigProperties;
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/DropInTest.java b/java/systests/src/main/java/org/apache/qpid/test/framework/DropInTest.java
index f7e38fb1ad..12cf0d79d5 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/DropInTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/DropInTest.java
@@ -18,7 +18,7 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework;
import javax.jms.JMSException;
import javax.jms.Message;
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java b/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
index 0c24836b27..d6cb0cad13 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/FrameworkBaseCase.java
@@ -25,16 +25,13 @@ import junit.framework.TestCase;
import org.apache.log4j.NDC;
import org.apache.qpid.client.transport.TransportConnection;
-import org.apache.qpid.interop.coordinator.sequencers.TestCaseSequencer;
+import org.apache.qpid.test.framework.sequencers.TestCaseSequencer;
import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.test.framework.localcircuit.CircuitImpl;
import uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-import javax.jms.JMSException;
-import javax.jms.Message;
-
import java.util.ArrayList;
-import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/MultiProducerConsumerPairImpl.java b/java/systests/src/main/java/org/apache/qpid/test/framework/MultiProducerConsumerPairImpl.java
deleted file mode 100644
index 88617555d3..0000000000
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/MultiProducerConsumerPairImpl.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.framework;
-
-import javax.jms.*;
-
-/**
- * Multiple producers and consumers made to look like a single producer and consumer. All methods repeated accross
- * all producers and consumers.
- */
-public class MultiProducerConsumerPairImpl implements CircuitEnd
-{
- /**
- * Gets the message producer at this circuit end point.
- *
- * @return The message producer at with this circuit end point.
- */
- public MessageProducer getProducer()
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /**
- * Gets the message consumer at this circuit end point.
- *
- * @return The message consumer at this circuit end point.
- */
- public MessageConsumer getConsumer()
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /**
- * Send the specified message over the producer at this end point.
- *
- * @param message The message to send.
- * @throws javax.jms.JMSException Any JMS exception occuring during the send is allowed to fall through.
- */
- public void send(Message message) throws JMSException
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /**
- * Gets the JMS Session associated with this circuit end point.
- *
- * @return The JMS Session associated with this circuit end point.
- */
- public Session getSession()
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /**
- * Closes the message producers and consumers and the sessions, associated with this circuit end point.
- *
- * @throws javax.jms.JMSException Any JMSExceptions occurring during the close are allowed to fall through.
- */
- public void close() throws JMSException
- {
- throw new RuntimeException("Not implemented.");
- }
-}
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/TestClientDetails.java b/java/systests/src/main/java/org/apache/qpid/test/framework/TestClientDetails.java
index 742375b7bd..1e5807cba8 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/TestClientDetails.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/TestClientDetails.java
@@ -18,7 +18,7 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework;
/**
* TestClientDetails is used to encapsulate information about an interop test client. It pairs together the unique
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/distributedcircuit/DistributedCircuitImpl.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedcircuit/DistributedCircuitImpl.java
index 405898f1e6..aadd378aed 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/distributedcircuit/DistributedCircuitImpl.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedcircuit/DistributedCircuitImpl.java
@@ -18,7 +18,7 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.distributedcircuit;
+package org.apache.qpid.test.framework.distributedcircuit;
import org.apache.qpid.test.framework.Assertion;
import org.apache.qpid.test.framework.Circuit;
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/Coordinator.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
index 28d8ce79a0..7d28aee432 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/Coordinator.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/Coordinator.java
@@ -18,7 +18,7 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework.distributedtesting;
import junit.framework.Test;
import junit.framework.TestResult;
@@ -28,6 +28,8 @@ import org.apache.log4j.Logger;
import org.apache.qpid.test.framework.MessagingTestConfigProperties;
import org.apache.qpid.test.framework.TestUtils;
+import org.apache.qpid.test.framework.TestClientDetails;
+import org.apache.qpid.test.framework.listeners.XMLTestListener;
import org.apache.qpid.util.ConversationFactory;
import org.apache.qpid.util.PrettyPrintingUtils;
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/DistributedTestCase.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/DistributedTestCase.java
index 96b0d0c33f..c47650ba1c 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/DistributedTestCase.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/DistributedTestCase.java
@@ -18,21 +18,21 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework.distributedtesting;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.sequencers.DistributedTestSequencer;
+import org.apache.qpid.test.framework.sequencers.DistributedTestSequencer;
import org.apache.qpid.test.framework.FrameworkBaseCase;
/**
- * DistributedTestCase provides a base class implementation of the {@link org.apache.qpid.interop.coordinator.sequencers.DistributedTestSequencer}, taking care of its
+ * DistributedTestCase provides a base class implementation of the {@link org.apache.qpid.test.framework.sequencers.DistributedTestSequencer}, taking care of its
* more mundane aspects, such as recording the test pariticipants.
*
* <p/><table id="crc"><caption>CRC Card</caption>
* <tr><th> Responsibilities <th> Collaborations
* <tr><td> Accept notification of test case participants.
- * <td> {@link org.apache.qpid.interop.coordinator.DistributedTestDecorator}
+ * <td> {@link DistributedTestDecorator}
* <tr><td> Accept JMS Connection to carry out the coordination over.
* </table>
*/
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/DistributedTestDecorator.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/DistributedTestDecorator.java
index e33a5c7228..bcc409dff9 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/DistributedTestDecorator.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/DistributedTestDecorator.java
@@ -18,13 +18,14 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework.distributedtesting;
import junit.framework.TestResult;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.sequencers.DistributedTestSequencer;
+import org.apache.qpid.test.framework.sequencers.DistributedTestSequencer;
+import org.apache.qpid.test.framework.TestClientDetails;
import org.apache.qpid.util.ConversationFactory;
import uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
@@ -42,8 +43,8 @@ import java.util.*;
* returns the set of test clients that are available to particiapte in the test.
*
* <p/>When used to wrap a {@link org.apache.qpid.test.framework.FrameworkBaseCase} test, it replaces the default
- * {@link org.apache.qpid.interop.coordinator.sequencers.TestCaseSequencer} implementations with a suitable
- * {@link org.apache.qpid.interop.coordinator.sequencers.DistributedTestSequencer}. Concrete implementations
+ * {@link org.apache.qpid.test.framework.sequencers.TestCaseSequencer} implementations with a suitable
+ * {@link org.apache.qpid.test.framework.sequencers.DistributedTestSequencer}. Concrete implementations
* can use this to configure the sending and receiving roles on the test.
*
* <p><table id="crc"><caption>CRC Card</caption>
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/FanOutTestDecorator.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/FanOutTestDecorator.java
index acace5bd7d..83d6602e57 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/FanOutTestDecorator.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/FanOutTestDecorator.java
@@ -18,17 +18,18 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework.distributedtesting;
import junit.framework.Test;
import junit.framework.TestResult;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.sequencers.DistributedTestSequencer;
-import org.apache.qpid.interop.coordinator.sequencers.FanOutTestSequencer;
-import org.apache.qpid.interop.coordinator.sequencers.InteropTestSequencer;
+import org.apache.qpid.test.framework.sequencers.DistributedTestSequencer;
+import org.apache.qpid.test.framework.sequencers.FanOutTestSequencer;
+import org.apache.qpid.test.framework.DropInTest;
import org.apache.qpid.util.ConversationFactory;
+import org.apache.qpid.test.framework.TestClientDetails;
import uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/InteropTestDecorator.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/InteropTestDecorator.java
index 7dcc391650..7743d2bba3 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/InteropTestDecorator.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/InteropTestDecorator.java
@@ -18,15 +18,16 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework.distributedtesting;
import junit.framework.Test;
import junit.framework.TestResult;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.sequencers.DistributedTestSequencer;
-import org.apache.qpid.interop.coordinator.sequencers.InteropTestSequencer;
+import org.apache.qpid.test.framework.sequencers.DistributedTestSequencer;
+import org.apache.qpid.test.framework.sequencers.InteropTestSequencer;
+import org.apache.qpid.test.framework.TestClientDetails;
import org.apache.qpid.util.ConversationFactory;
import uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/OptOutTestCase.java b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/OptOutTestCase.java
index f3673583e7..83ec12ad56 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/OptOutTestCase.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/distributedtesting/OptOutTestCase.java
@@ -18,11 +18,9 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework.distributedtesting;
-import junit.framework.Assert;
-
-import org.apache.qpid.interop.coordinator.sequencers.DistributedTestSequencer;
+import org.apache.qpid.test.framework.sequencers.DistributedTestSequencer;
/**
* An OptOutTestCase is a test case that automatically fails. It is used when a list of test clients has been generated
@@ -51,7 +49,7 @@ public class OptOutTestCase extends DistributedTestCase
{
DistributedTestSequencer sequencer = getDistributedTestSequencer();
- Assert.fail("One of " + sequencer.getSender() + " and " + getDistributedTestSequencer().getReceivers()
+ fail("One of " + sequencer.getSender() + " and " + getDistributedTestSequencer().getReceivers()
+ " opted out of the test.");
}
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/XMLTestListener.java b/java/systests/src/main/java/org/apache/qpid/test/framework/listeners/XMLTestListener.java
index 74c86b1d83..ee274a1e01 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/XMLTestListener.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/listeners/XMLTestListener.java
@@ -18,7 +18,7 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator;
+package org.apache.qpid.test.framework.listeners;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/CircuitImpl.java b/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/CircuitImpl.java
index 0bcf2e5036..3c678eef7d 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/CircuitImpl.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/CircuitImpl.java
@@ -18,10 +18,10 @@
* under the License.
*
*/
-package org.apache.qpid.test.framework;
+package org.apache.qpid.test.framework.localcircuit;
import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.test.framework.MessageMonitor;
+import org.apache.qpid.test.framework.*;
import uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
@@ -42,10 +42,10 @@ import java.util.concurrent.atomic.AtomicLong;
* <tr><td> Start the circuit running.
* <tr><td> Close the circuit down.
* <tr><td> Take a reading of the circuits state.
- * <tr><td> Apply assertions against the circuits state. <td> {@link Assertion}
+ * <tr><td> Apply assertions against the circuits state. <td> {@link org.apache.qpid.test.framework.Assertion}
* <tr><td> Send test messages over the circuit.
* <tr><td> Perform the default test procedure on the circuit.
- * <tr><td> Provide access to connection and session exception monitors <td> {@link ExceptionMonitor}
+ * <tr><td> Provide access to connection and session exception monitors <td> {@link org.apache.qpid.test.framework.ExceptionMonitor}
* </table>
*
* @todo Add ability to create routes with no consumers active on them. Immediate/Mandatory tests are closing consumers
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/PublisherImpl.java b/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/PublisherImpl.java
index 48bb9187fb..5b63607867 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/PublisherImpl.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/PublisherImpl.java
@@ -18,17 +18,19 @@
* under the License.
*
*/
-package org.apache.qpid.test.framework;
+package org.apache.qpid.test.framework.localcircuit;
import org.apache.qpid.client.AMQNoConsumersException;
import org.apache.qpid.client.AMQNoRouteException;
+import org.apache.qpid.test.framework.localcircuit.CircuitImpl;
+import org.apache.qpid.test.framework.*;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
/**
- * Provides an implementation of the {@link Publisher} interface that wraps a single message producer and consumer on
+ * Provides an implementation of the {@link org.apache.qpid.test.framework.Publisher} interface that wraps a single message producer and consumer on
* a single session.
*
* <p/><table id="crc"><caption>CRC Card</caption>
diff --git a/java/systests/src/main/java/org/apache/qpid/test/framework/ReceiverImpl.java b/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/ReceiverImpl.java
index ce783ed9e0..6dd7056806 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/framework/ReceiverImpl.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/localcircuit/ReceiverImpl.java
@@ -18,14 +18,19 @@
* under the License.
*
*/
-package org.apache.qpid.test.framework;
+package org.apache.qpid.test.framework.localcircuit;
+
+import org.apache.qpid.test.framework.localcircuit.CircuitImpl;
+import org.apache.qpid.test.framework.CircuitEndBase;
+import org.apache.qpid.test.framework.Receiver;
+import org.apache.qpid.test.framework.Assertion;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
/**
- * Provides an implementation of the {@link Receiver} interface that wraps a single message producer and consumer on
+ * Provides an implementation of the {@link org.apache.qpid.test.framework.Receiver} interface that wraps a single message producer and consumer on
* a single session.
*
* <p/><table id="crc"><caption>CRC Card</caption>
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/BaseDistributedTestSequencer.java b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/BaseDistributedTestSequencer.java
index ad073014d0..a0e3d3b4a6 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/BaseDistributedTestSequencer.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/BaseDistributedTestSequencer.java
@@ -18,12 +18,12 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.sequencers;
+package org.apache.qpid.test.framework.sequencers;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.DistributedTestCase;
-import org.apache.qpid.interop.coordinator.TestClientDetails;
+import org.apache.qpid.test.framework.distributedtesting.DistributedTestCase;
+import org.apache.qpid.test.framework.TestClientDetails;
import org.apache.qpid.test.framework.Circuit;
import org.apache.qpid.util.ConversationFactory;
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/DistributedTestSequencer.java b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/DistributedTestSequencer.java
index 9b58107796..73e61ec921 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/DistributedTestSequencer.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/DistributedTestSequencer.java
@@ -18,16 +18,16 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.sequencers;
+package org.apache.qpid.test.framework.sequencers;
-import org.apache.qpid.interop.coordinator.TestClientDetails;
+import org.apache.qpid.test.framework.TestClientDetails;
import org.apache.qpid.util.ConversationFactory;
import java.util.List;
/**
* A DistributedTestSequencer is a test sequencer that coordinates activity amongst many
- * {@link org.apache.qpid.interop.testclient.TestClient}s.
+ * {@link org.apache.qpid.test.framework.distributedtesting.TestClient}s.
*
* <p><table id="crc"><caption>CRC Card</caption>
* <tr><th> Responsibilities <th> Collaborations
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/FanOutTestSequencer.java b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/FanOutTestSequencer.java
index 5a41481e21..a116b23065 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/FanOutTestSequencer.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/FanOutTestSequencer.java
@@ -18,11 +18,11 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.sequencers;
+package org.apache.qpid.test.framework.sequencers;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.TestClientDetails;
+import org.apache.qpid.test.framework.TestClientDetails;
import org.apache.qpid.test.framework.Assertion;
import org.apache.qpid.test.framework.Circuit;
import org.apache.qpid.test.framework.TestUtils;
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/InteropTestSequencer.java b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/InteropTestSequencer.java
index 0230bf4d77..f2253d416b 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/InteropTestSequencer.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/InteropTestSequencer.java
@@ -18,11 +18,11 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.sequencers;
+package org.apache.qpid.test.framework.sequencers;
import org.apache.log4j.Logger;
-import org.apache.qpid.interop.coordinator.TestClientDetails;
+import org.apache.qpid.test.framework.TestClientDetails;
import org.apache.qpid.test.framework.Assertion;
import org.apache.qpid.test.framework.Circuit;
import org.apache.qpid.test.framework.TestUtils;
diff --git a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/TestCaseSequencer.java b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/TestCaseSequencer.java
index 94105f30a8..4f09642467 100644
--- a/java/systests/src/main/java/org/apache/qpid/interop/coordinator/sequencers/TestCaseSequencer.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/framework/sequencers/TestCaseSequencer.java
@@ -18,7 +18,7 @@
* under the License.
*
*/
-package org.apache.qpid.interop.coordinator.sequencers;
+package org.apache.qpid.test.framework.sequencers;
import org.apache.qpid.test.framework.Assertion;
import org.apache.qpid.test.framework.Circuit;