summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-01-06 02:07:20 +0000
committerRafael H. Schloming <rhs@apache.org>2009-01-06 02:07:20 +0000
commit7f42616db97eee3890f07188272b8d028839ebec (patch)
treeb20a578ebb71521b346a9e4f06db3237ef0b7450
parent2d0f50dd935642cf84b3fc3eb7fcbb1cf12dcbe8 (diff)
downloadqpid-python-7f42616db97eee3890f07188272b8d028839ebec.tar.gz
QPID-1557: fixed the cpp.cluster test profile
- pulled out the XA excludes into a separate excludes file - made the cluster profile exclude the XA tests - made the build system automatically set all system properties that start with profile - added a profile.clustered property that defaults to false - made the cpp.cluster test profile set the profile.clustered property to true - modified the failover tests to exclude some erroneous asserts if the broker is clustered - modified the java client to not advertize a non-zero timeout git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@731810 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/08ExcludeList4
-rw-r--r--qpid/java/08ExcludeList-nonvm3
-rw-r--r--qpid/java/XAExcludeList3
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java9
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java4
-rw-r--r--qpid/java/cpp.cluster.testprofile4
-rw-r--r--qpid/java/default.testprofile4
-rw-r--r--qpid/java/java.testprofile2
-rw-r--r--qpid/java/module.xml3
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java11
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java8
11 files changed, 39 insertions, 16 deletions
diff --git a/qpid/java/08ExcludeList b/qpid/java/08ExcludeList
index f3fa90d915..88eb754950 100644
--- a/qpid/java/08ExcludeList
+++ b/qpid/java/08ExcludeList
@@ -1,7 +1,3 @@
-// Disable XA tests when running 08
-org.apache.qpid.test.unit.xa.QueueTest#*
-org.apache.qpid.test.unit.xa.TopicTest#*
-org.apache.qpid.test.unit.xa.FaultTest#*
org.apache.qpid.test.unit.ct.DurableSubscriberTests#*
// Those tests are not finished
org.apache.qpid.test.testcases.TTLTest#*
diff --git a/qpid/java/08ExcludeList-nonvm b/qpid/java/08ExcludeList-nonvm
index b77b06e3ac..eb6c60b225 100644
--- a/qpid/java/08ExcludeList-nonvm
+++ b/qpid/java/08ExcludeList-nonvm
@@ -1,6 +1,3 @@
-org.apache.qpid.test.unit.xa.QueueTest#*
-org.apache.qpid.test.unit.xa.TopicTest#*
-org.apache.qpid.test.unit.xa.FaultTest#*
org.apache.qpid.test.unit.ct.DurableSubscriberTests#*
// Those tests are not finished
org.apache.qpid.test.testcases.TTLTest#*
diff --git a/qpid/java/XAExcludeList b/qpid/java/XAExcludeList
new file mode 100644
index 0000000000..1bb26c5f27
--- /dev/null
+++ b/qpid/java/XAExcludeList
@@ -0,0 +1,3 @@
+org.apache.qpid.test.unit.xa.QueueTest#*
+org.apache.qpid.test.unit.xa.TopicTest#*
+org.apache.qpid.test.unit.xa.FaultTest#*
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
index 22561dcc33..1a44ed8973 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
@@ -179,7 +179,9 @@ public class Session extends SessionInvoker
{
initReceiver();
sessionAttach(name.getBytes());
- sessionRequestTimeout(expiry);
+ // XXX: when the broker and client support full session
+ // recovery we should use expiry as the requested timeout
+ sessionRequestTimeout(0);
}
void resume()
@@ -734,6 +736,11 @@ public class Session extends SessionInvoker
synchronized (commands)
{
state = CLOSING;
+ // XXX: we manually set the expiry to zero here to
+ // simulate full session recovery in brokers that don't
+ // support it, we should remove this line when there is
+ // broker support for full session resume:
+ expiry = 0;
sessionRequestTimeout(0);
sessionDetach(name.getBytes());
Waiter w = new Waiter(commands, timeout);
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
index 520291e71c..b2c22f22e9 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
@@ -64,7 +64,9 @@ public class SessionDelegate
@Override public void sessionTimeout(Session ssn, SessionTimeout t)
{
- ssn.setExpiry(t.getTimeout());
+ // XXX: we ignore this right now, we should uncomment this
+ // when full session resume is supported:
+ // ssn.setExpiry(t.getTimeout());
}
@Override public void sessionCompleted(Session ssn, SessionCompleted cmp)
diff --git a/qpid/java/cpp.cluster.testprofile b/qpid/java/cpp.cluster.testprofile
index 1353af18f2..1807ae098b 100644
--- a/qpid/java/cpp.cluster.testprofile
+++ b/qpid/java/cpp.cluster.testprofile
@@ -1,3 +1,5 @@
broker.version=0-10
broker=${project.root}/../cpp/src/qpidd --load-module ${project.root}/../cpp/src/.libs/cluster.so --cluster-name cpp-java-test-cluster -p @PORT --data-dir ${build.data}/@PORT -t --auth no
-test.excludesfile=${project.root}/ExcludeList ${project.root}/010ExcludeList
+test.excludesfile=${project.root}/ExcludeList ${project.root}/XAExcludeList ${project.root}/010ExcludeList
+
+profile.clustered=true
diff --git a/qpid/java/default.testprofile b/qpid/java/default.testprofile
index 46c3f7746a..ab22d58b28 100644
--- a/qpid/java/default.testprofile
+++ b/qpid/java/default.testprofile
@@ -14,10 +14,12 @@ log4j.configuration=file:///${project.root}/log4j-test.xml
log4j.debug=false
test.excludes=true
-test.excludesfile=${project.root}/ExcludeList ${project.root}/08ExcludeList
+test.excludesfile=${project.root}/ExcludeList ${project.root}/XAExcludeList ${project.root}/08ExcludeList
test.fork=no
test.mem=512M
test=*Test
haltonfailure=no
haltonerror=no
exclude.modules=none
+
+profile.clustered=false
diff --git a/qpid/java/java.testprofile b/qpid/java/java.testprofile
index ab98e47e97..95282b8ee1 100644
--- a/qpid/java/java.testprofile
+++ b/qpid/java/java.testprofile
@@ -2,4 +2,4 @@ broker=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT
broker.clean=${project.root}/clean-dir ${build.data}
broker.ready=Qpid Broker Ready
-test.excludesfile=${project.root}/ExcludeList ${project.root}/08ExcludeList-nonvm
+test.excludesfile=${project.root}/ExcludeList ${project.root}/XAExcludeList ${project.root}/08ExcludeList-nonvm
diff --git a/qpid/java/module.xml b/qpid/java/module.xml
index fd3c44c752..a9bd9a2b2a 100644
--- a/qpid/java/module.xml
+++ b/qpid/java/module.xml
@@ -241,6 +241,9 @@
<sysproperty key="test.excludes" value="${test.excludes}"/>
<sysproperty key="test.excludesfile" value="${test.excludesfile}"/>
<sysproperty key="test.output" value="${module.results}"/>
+ <syspropertyset>
+ <propertyref prefix="profile"/>
+ </syspropertyset>
<sysproperty key="max_prefetch" value ="${max_prefetch}"/>
<sysproperty key="example.plugin.target" value="${project.root}/build/lib/plugins"/>
<sysproperty key="QPID_EXAMPLE_HOME" value="${project.root}/build"/>
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
index 9f3a8f3cb4..737e7aa6a7 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
@@ -47,6 +47,7 @@ public class QueueBrowserAutoAckTest extends FailoverBaseCase
protected Session _clientSession;
protected Queue _queue;
protected static final String MESSAGE_ID_PROPERTY = "MessageIDProperty";
+ protected boolean CLUSTERED = Boolean.getBoolean("profile.clustered");
public void setUp() throws Exception
{
@@ -452,7 +453,10 @@ public class QueueBrowserAutoAckTest extends FailoverBaseCase
sendMessages("connection1", messages);
- sendMessages("connection2", messages);
+ if (!CLUSTERED)
+ {
+ sendMessages("connection2", messages);
+ }
checkQueueDepth(messages);
@@ -517,7 +521,10 @@ public class QueueBrowserAutoAckTest extends FailoverBaseCase
int messages = 50;
sendMessages("connection1", messages);
- sendMessages("connection2", messages);
+ if (!CLUSTERED)
+ {
+ sendMessages("connection2", messages);
+ }
failBroker();
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
index 3f610aa15d..3a1fb50725 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
@@ -60,6 +60,7 @@ public class FailoverTest extends FailoverBaseCase implements ConnectionListener
private static int usedBrokers = 0;
private CountDownLatch failoverComplete;
private static final long DEFAULT_FAILOVER_TIME = 10000L;
+ private boolean CLUSTERED = Boolean.getBoolean("profile.clustered");
@Override
protected void setUp() throws Exception
@@ -158,9 +159,12 @@ public class FailoverTest extends FailoverBaseCase implements ConnectionListener
causeFailure(DEFAULT_FAILOVER_TIME);
- msg = consumer.receive(500);
+ if (!CLUSTERED)
+ {
+ msg = consumer.receive(500);
+ assertNull("Should not have received message from new broker!", msg);
+ }
- assertNull("Should not have received message from new broker!", msg);
// Check that messages still sent / received
sendMessages(totalMessages, transacted);
consumeMessages(totalMessages, transacted);