Author: rhs
Date: Mon Jan 5 18:07:20 2009
New Revision: 731810
URL: http://svn.apache.org/viewvc?rev=731810&view=rev
Log:
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
Added:
qpid/trunk/qpid/java/XAExcludeList
Modified:
qpid/trunk/qpid/java/08ExcludeList
qpid/trunk/qpid/java/08ExcludeList-nonvm
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
qpid/trunk/qpid/java/cpp.cluster.testprofile
qpid/trunk/qpid/java/default.testprofile
qpid/trunk/qpid/java/java.testprofile
qpid/trunk/qpid/java/module.xml
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
Modified: qpid/trunk/qpid/java/08ExcludeList
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/08ExcludeList?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
--- qpid/trunk/qpid/java/08ExcludeList (original)
+++ qpid/trunk/qpid/java/08ExcludeList Mon Jan 5 18:07:20 2009
@@ -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#*
Modified: qpid/trunk/qpid/java/08ExcludeList-nonvm
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/08ExcludeList-nonvm?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
--- qpid/trunk/qpid/java/08ExcludeList-nonvm (original)
+++ qpid/trunk/qpid/java/08ExcludeList-nonvm Mon Jan 5 18:07:20 2009
@@ -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#*
Added: qpid/trunk/qpid/java/XAExcludeList
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/XAExcludeList?rev=731810&view=auto
==============================================================================
--- qpid/trunk/qpid/java/XAExcludeList (added)
+++ qpid/trunk/qpid/java/XAExcludeList Mon Jan 5 18:07:20 2009
@@ -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#*
Modified:
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
---
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
(original)
+++
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
Mon Jan 5 18:07:20 2009
@@ -179,7 +179,9 @@
{
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 @@
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);
Modified:
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
---
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
(original)
+++
qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
Mon Jan 5 18:07:20 2009
@@ -64,7 +64,9 @@
@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)
Modified: qpid/trunk/qpid/java/cpp.cluster.testprofile
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/cpp.cluster.testprofile?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
--- qpid/trunk/qpid/java/cpp.cluster.testprofile (original)
+++ qpid/trunk/qpid/java/cpp.cluster.testprofile Mon Jan 5 18:07:20 2009
@@ -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
Modified: qpid/trunk/qpid/java/default.testprofile
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/default.testprofile?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
--- qpid/trunk/qpid/java/default.testprofile (original)
+++ qpid/trunk/qpid/java/default.testprofile Mon Jan 5 18:07:20 2009
@@ -14,10 +14,12 @@
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
Modified: qpid/trunk/qpid/java/java.testprofile
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/java.testprofile?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
--- qpid/trunk/qpid/java/java.testprofile (original)
+++ qpid/trunk/qpid/java/java.testprofile Mon Jan 5 18:07:20 2009
@@ -2,4 +2,4 @@
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
Modified: qpid/trunk/qpid/java/module.xml
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/module.xml?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
--- qpid/trunk/qpid/java/module.xml (original)
+++ qpid/trunk/qpid/java/module.xml Mon Jan 5 18:07:20 2009
@@ -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"/>
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
---
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
(original)
+++
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
Mon Jan 5 18:07:20 2009
@@ -47,6 +47,7 @@
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 @@
sendMessages("connection1", messages);
- sendMessages("connection2", messages);
+ if (!CLUSTERED)
+ {
+ sendMessages("connection2", messages);
+ }
checkQueueDepth(messages);
@@ -517,7 +521,10 @@
int messages = 50;
sendMessages("connection1", messages);
- sendMessages("connection2", messages);
+ if (!CLUSTERED)
+ {
+ sendMessages("connection2", messages);
+ }
failBroker();
Modified:
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java?rev=731810&r1=731809&r2=731810&view=diff
==============================================================================
---
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
(original)
+++
qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
Mon Jan 5 18:07:20 2009
@@ -60,6 +60,7 @@
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 @@
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);