qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject qpid-jms git commit: NO-JIRA: simplify test method, remove arg that isnt useful and is always false
Date Mon, 05 Nov 2018 11:17:36 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 24d03437f -> 9c1afa9b3


NO-JIRA: simplify test method, remove arg that isnt useful and is always false


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/9c1afa9b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/9c1afa9b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/9c1afa9b

Branch: refs/heads/master
Commit: 9c1afa9b34250bfb2217af4df6c28e69801e8d12
Parents: 24d0343
Author: Robbie Gemmell <robbie@apache.org>
Authored: Mon Nov 5 11:16:29 2018 +0000
Committer: Robbie Gemmell <robbie@apache.org>
Committed: Mon Nov 5 11:16:38 2018 +0000

----------------------------------------------------------------------
 .../integration/ProducerIntegrationTest.java    | 14 +++++++-------
 .../QueueBrowserIntegrationTest.java            |  2 +-
 .../TransactionsIntegrationTest.java            | 20 ++++++++++----------
 .../failover/FailoverIntegrationTest.java       |  6 +++---
 .../qpid/jms/test/testpeer/TestAmqpPeer.java    | 10 +++++-----
 5 files changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9c1afa9b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
index 0e52d67..924453f 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/ProducerIntegrationTest.java
@@ -1418,7 +1418,7 @@ public class ProducerIntegrationTest extends QpidJmsTestCase {
             MessageProducer producer = session.createProducer(queue);
             Message message = session.createTextMessage("content");
 
-            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), false,
responseState, true);
+            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), responseState,
true);
             testPeer.expectClose();
 
             assertNull("Should not yet have a JMSDestination", message.getJMSDestination());
@@ -1503,7 +1503,7 @@ public class ProducerIntegrationTest extends QpidJmsTestCase {
 
             Message message = session.createTextMessage("content");
 
-            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), false,
responseState, true);
+            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), responseState,
true);
 
             assertNull("Should not yet have a JMSDestination", message.getJMSDestination());
 
@@ -2333,7 +2333,7 @@ public class ProducerIntegrationTest extends QpidJmsTestCase {
 
             Message message = session.createTextMessage("content");
 
-            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), false,
responseState, true);
+            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), responseState,
true);
 
             assertNull("Should not yet have a JMSDestination", message.getJMSDestination());
 
@@ -2504,7 +2504,7 @@ public class ProducerIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
             testPeer.expectDischarge(txnId, true);
             testPeer.expectClose();
 
@@ -2575,7 +2575,7 @@ public class ProducerIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
             testPeer.expectDischarge(txnId, true);
             testPeer.expectClose();
 
@@ -2646,7 +2646,7 @@ public class ProducerIntegrationTest extends QpidJmsTestCase {
             messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
 
             testPeer.expectSenderAttach(targetMatcher, false, false);
-            testPeer.expectTransfer(messageMatcher, nullValue(), false, new Rejected(), true);
+            testPeer.expectTransfer(messageMatcher, nullValue(), new Rejected(), true);
             testPeer.expectDetach(true, true, true);
 
             Message message = session.createMessage();
@@ -2708,7 +2708,7 @@ public class ProducerIntegrationTest extends QpidJmsTestCase {
             messageMatcher.setMessageAnnotationsMatcher(msgAnnotationsMatcher);
 
             testPeer.expectSenderAttach(targetMatcher, false, false);
-            testPeer.expectTransfer(messageMatcher, nullValue(), false, new Rejected(), true);
+            testPeer.expectTransfer(messageMatcher, nullValue(), new Rejected(), true);
             testPeer.expectDetach(true, true, true);
 
             // Producer should act as synchronous regardless of asynchronous send setting.

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9c1afa9b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/QueueBrowserIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/QueueBrowserIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/QueueBrowserIntegrationTest.java
index 5fb64cc..3dc1b53 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/QueueBrowserIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/QueueBrowserIntegrationTest.java
@@ -281,7 +281,7 @@ public class QueueBrowserIntegrationTest extends QpidJmsTestCase {
             Binary txnId = new Binary(new byte[]{ (byte) 1, (byte) 2, (byte) 3, (byte) 4});
             TransferPayloadCompositeMatcher declareMatcher = new TransferPayloadCompositeMatcher();
             declareMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(new Declare()));
-            testPeer.expectTransfer(declareMatcher, nullValue(), false, new Declared().setTxnId(txnId),
true);
+            testPeer.expectTransfer(declareMatcher, nullValue(), new Declared().setTxnId(txnId),
true);
 
             Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
             Queue queue = session.createQueue("myQueue");

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9c1afa9b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/TransactionsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/TransactionsIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/TransactionsIntegrationTest.java
index d026b2c..39d8f00 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/TransactionsIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/integration/TransactionsIntegrationTest.java
@@ -155,7 +155,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId1);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
 
             producer.send(session.createMessage());
 
@@ -219,7 +219,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId1);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
 
             producer.send(session.createMessage());
 
@@ -250,7 +250,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId2);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
             testPeer.expectDischarge(txnId2, true);
 
             producer.send(session.createMessage());
@@ -299,7 +299,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId1);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
 
             producer.send(session.createMessage());
 
@@ -329,7 +329,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId2);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
             testPeer.expectDischarge(txnId2, true);
 
             producer.send(session.createMessage());
@@ -611,7 +611,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
             testPeer.expectDischarge(txnId, true);
 
             producer.send(session.createMessage());
@@ -663,7 +663,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
                 txState.setTxnId(txnId);
                 txState.setOutcome(new Accepted());
 
-                testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+                testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
 
                 message.setIntProperty("sequence", i);
 
@@ -832,7 +832,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
 
             producer.send(session.createMessage());
 
@@ -899,7 +899,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             txState.setTxnId(txnId);
             txState.setOutcome(new Accepted());
 
-            testPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            testPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
 
             producer.send(session.createMessage());
 
@@ -1566,7 +1566,7 @@ public class TransactionsIntegrationTest extends QpidJmsTestCase {
             Binary txnId = new Binary(new byte[]{ (byte) 1, (byte) 2, (byte) 3, (byte) 4});
             TransferPayloadCompositeMatcher declareMatcher = new TransferPayloadCompositeMatcher();
             declareMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(new Declare()));
-            testPeer.expectTransfer(declareMatcher, nullValue(), false, new Declared().setTxnId(txnId),
true);
+            testPeer.expectTransfer(declareMatcher, nullValue(), new Declared().setTxnId(txnId),
true);
 
             Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
             Queue queue = session.createQueue("myQueue");

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9c1afa9b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverIntegrationTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverIntegrationTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverIntegrationTest.java
index 9a7c95f..3365154 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverIntegrationTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverIntegrationTest.java
@@ -2146,7 +2146,7 @@ public class FailoverIntegrationTest extends QpidJmsTestCase {
             MessageProducer producer = session.createProducer(queue);
 
             Message message = session.createTextMessage("content");
-            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), false,
new Rejected(), true);
+            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), new
Rejected(), true);
 
             assertNull("Should not yet have a JMSDestination", message.getJMSDestination());
 
@@ -2210,7 +2210,7 @@ public class FailoverIntegrationTest extends QpidJmsTestCase {
             }
 
             // Accept one which shouldn't complete until after the others have failed.
-            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), false,
new Accepted(), true);
+            testPeer.expectTransfer(new TransferPayloadCompositeMatcher(), nullValue(), new
Accepted(), true);
             testPeer.dropAfterLastHandler();
 
             TestJmsCompletionListener listener = new TestJmsCompletionListener(MSG_COUNT
+ 1);
@@ -3371,7 +3371,7 @@ public class FailoverIntegrationTest extends QpidJmsTestCase {
             // reply with a Declared disposition state containing the txnId.
             originalPeer.expectDeclare(txnId);
             originalPeer.expectSenderAttach();
-            originalPeer.expectTransfer(messageMatcher, stateMatcher, false, txState, true);
+            originalPeer.expectTransfer(messageMatcher, stateMatcher, txState, true);
             originalPeer.dropAfterLastHandler(10);
 
             // --- Post Failover Expectations of sender --- //

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/9c1afa9b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
index e830c35..909d0e6 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
@@ -2163,10 +2163,10 @@ public class TestAmqpPeer implements AutoCloseable
         expectTransfer(null, nullValue(), false, true, new Accepted(), true, frameSize, 0);
     }
 
-    public void expectTransfer(Matcher<Binary> expectedPayloadMatcher, Matcher<?>
stateMatcher, boolean settled,
+    public void expectTransfer(Matcher<Binary> expectedPayloadMatcher, Matcher<?>
stateMatcher,
                                ListDescribedType responseState, boolean responseSettled)
     {
-        expectTransfer(expectedPayloadMatcher, stateMatcher, settled, true, responseState,
responseSettled);
+        expectTransfer(expectedPayloadMatcher, stateMatcher, false, true, responseState,
responseSettled);
     }
 
     public void expectTransfer(Matcher<Binary> expectedPayloadMatcher, Matcher<?>
stateMatcher, boolean settled,
@@ -2281,7 +2281,7 @@ public class TestAmqpPeer implements AutoCloseable
         TransferPayloadCompositeMatcher declareMatcher = new TransferPayloadCompositeMatcher();
         declareMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(new Declare()));
 
-        expectTransfer(declareMatcher, nullValue(), false, new Declared().setTxnId(txnId),
true);
+        expectTransfer(declareMatcher, nullValue(), new Declared().setTxnId(txnId), true);
     }
 
     public void expectDeclareButDoNotRespond()
@@ -2297,7 +2297,7 @@ public class TestAmqpPeer implements AutoCloseable
         TransferPayloadCompositeMatcher declareMatcher = new TransferPayloadCompositeMatcher();
         declareMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(new Declare()));
 
-        expectTransfer(declareMatcher, nullValue(), false, new Rejected(), true);
+        expectTransfer(declareMatcher, nullValue(), new Rejected(), true);
     }
 
     public void expectDischarge(Binary txnId, boolean dischargeState) {
@@ -2314,7 +2314,7 @@ public class TestAmqpPeer implements AutoCloseable
         TransferPayloadCompositeMatcher dischargeMatcher = new TransferPayloadCompositeMatcher();
         dischargeMatcher.setMessageContentMatcher(new EncodedAmqpValueMatcher(discharge));
 
-        expectTransfer(dischargeMatcher, nullValue(), false, responseState, true);
+        expectTransfer(dischargeMatcher, nullValue(), responseState, true);
     }
 
     public void expectDischargeButDoNotRespond(Binary txnId, boolean dischargeState) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message