Repository: qpid-proton
Updated Branches:
  refs/heads/master 26553f012 -> ff64a3160


PROTON-1141 fix some more tests that use deprecated assertions.


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

Branch: refs/heads/master
Commit: ff64a31605b32b2feb569a09b11a3ef43ba8a3b4
Parents: 26553f0
Author: Timothy Bish <[email protected]>
Authored: Tue Feb 23 13:59:27 2016 -0500
Committer: Timothy Bish <[email protected]>
Committed: Tue Feb 23 13:59:44 2016 -0500

----------------------------------------------------------------------
 .../systemtests/DefaultDeliveryStateTest.java   |  6 ++--
 .../qpid/proton/systemtests/EngineTestBase.java |  4 +--
 .../qpid/proton/systemtests/LinkTest.java       |  9 ++---
 .../systemtests/ProtonEngineExampleTest.java    | 36 ++------------------
 4 files changed, 10 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ff64a316/proton-j/src/test/java/org/apache/qpid/proton/systemtests/DefaultDeliveryStateTest.java
----------------------------------------------------------------------
diff --git 
a/proton-j/src/test/java/org/apache/qpid/proton/systemtests/DefaultDeliveryStateTest.java
 
b/proton-j/src/test/java/org/apache/qpid/proton/systemtests/DefaultDeliveryStateTest.java
index 136d5ff..198123d 100644
--- 
a/proton-j/src/test/java/org/apache/qpid/proton/systemtests/DefaultDeliveryStateTest.java
+++ 
b/proton-j/src/test/java/org/apache/qpid/proton/systemtests/DefaultDeliveryStateTest.java
@@ -19,14 +19,14 @@
 package org.apache.qpid.proton.systemtests;
 
 import static java.util.EnumSet.of;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
 import static org.apache.qpid.proton.engine.EndpointState.ACTIVE;
 import static org.apache.qpid.proton.engine.EndpointState.CLOSED;
 import static org.apache.qpid.proton.engine.EndpointState.UNINITIALIZED;
 import static org.apache.qpid.proton.systemtests.TestLoggingHelper.bold;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
 
 import java.nio.charset.StandardCharsets;
 import java.util.Arrays;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ff64a316/proton-j/src/test/java/org/apache/qpid/proton/systemtests/EngineTestBase.java
----------------------------------------------------------------------
diff --git 
a/proton-j/src/test/java/org/apache/qpid/proton/systemtests/EngineTestBase.java 
b/proton-j/src/test/java/org/apache/qpid/proton/systemtests/EngineTestBase.java
index 7f1822c..9dadf29 100644
--- 
a/proton-j/src/test/java/org/apache/qpid/proton/systemtests/EngineTestBase.java
+++ 
b/proton-j/src/test/java/org/apache/qpid/proton/systemtests/EngineTestBase.java
@@ -18,8 +18,8 @@
  */
 package org.apache.qpid.proton.systemtests;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.nio.ByteBuffer;
 import java.util.logging.Logger;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ff64a316/proton-j/src/test/java/org/apache/qpid/proton/systemtests/LinkTest.java
----------------------------------------------------------------------
diff --git 
a/proton-j/src/test/java/org/apache/qpid/proton/systemtests/LinkTest.java 
b/proton-j/src/test/java/org/apache/qpid/proton/systemtests/LinkTest.java
index 0811f16..0711368 100644
--- a/proton-j/src/test/java/org/apache/qpid/proton/systemtests/LinkTest.java
+++ b/proton-j/src/test/java/org/apache/qpid/proton/systemtests/LinkTest.java
@@ -19,12 +19,12 @@
 package org.apache.qpid.proton.systemtests;
 
 import static java.util.EnumSet.of;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
 import static org.apache.qpid.proton.engine.EndpointState.ACTIVE;
 import static org.apache.qpid.proton.engine.EndpointState.UNINITIALIZED;
 import static org.apache.qpid.proton.systemtests.TestLoggingHelper.bold;
+import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -59,7 +59,6 @@ public class LinkTest extends EngineTestBase
         Map<Symbol, Object> senderProps = new HashMap<>();
         senderProps.put(SND_PROP, SND_PROP_VAL);
 
-
         LOGGER.fine(bold("======== About to create transports"));
 
         getClient().transport = Proton.transport();
@@ -76,14 +75,12 @@ public class LinkTest extends EngineTestBase
         getServer().connection = Proton.connection();
         getServer().transport.bind(getServer().connection);
 
-
         LOGGER.fine(bold("======== About to open connections"));
         getClient().connection.open();
         getServer().connection.open();
 
         doOutputInputCycle();
 
-
         LOGGER.fine(bold("======== About to open sessions"));
         getClient().session = getClient().connection.session();
         getClient().session.open();
@@ -99,7 +96,6 @@ public class LinkTest extends EngineTestBase
         pumpServerToClient();
         assertEndpointState(getClient().session, ACTIVE, ACTIVE);
 
-
         LOGGER.fine(bold("======== About to create reciever"));
 
         getClient().source = new Source();
@@ -125,7 +121,6 @@ public class LinkTest extends EngineTestBase
 
         pumpClientToServer();
 
-
         LOGGER.fine(bold("======== About to set up implicitly created 
sender"));
 
         getServer().sender = (Sender) 
getServer().connection.linkHead(of(UNINITIALIZED), of(ACTIVE));

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ff64a316/proton-j/src/test/java/org/apache/qpid/proton/systemtests/ProtonEngineExampleTest.java
----------------------------------------------------------------------
diff --git 
a/proton-j/src/test/java/org/apache/qpid/proton/systemtests/ProtonEngineExampleTest.java
 
b/proton-j/src/test/java/org/apache/qpid/proton/systemtests/ProtonEngineExampleTest.java
index 21a9210..cb167f8 100644
--- 
a/proton-j/src/test/java/org/apache/qpid/proton/systemtests/ProtonEngineExampleTest.java
+++ 
b/proton-j/src/test/java/org/apache/qpid/proton/systemtests/ProtonEngineExampleTest.java
@@ -19,15 +19,15 @@
 package org.apache.qpid.proton.systemtests;
 
 import static java.util.EnumSet.of;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertFalse;
-import static junit.framework.Assert.assertTrue;
 import static org.apache.qpid.proton.engine.EndpointState.ACTIVE;
 import static org.apache.qpid.proton.engine.EndpointState.CLOSED;
 import static org.apache.qpid.proton.engine.EndpointState.UNINITIALIZED;
 import static org.apache.qpid.proton.systemtests.TestLoggingHelper.bold;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
 
 import java.util.Arrays;
 import java.util.logging.Logger;
@@ -89,16 +89,12 @@ public class ProtonEngineExampleTest extends EngineTestBase
         getServer().connection = Proton.connection();
         getServer().transport.bind(getServer().connection);
 
-
-
         LOGGER.fine(bold("======== About to open connections"));
         getClient().connection.open();
         getServer().connection.open();
 
         doOutputInputCycle();
 
-
-
         LOGGER.fine(bold("======== About to open sessions"));
         getClient().session = getClient().connection.session();
         getClient().session.open();
@@ -114,8 +110,6 @@ public class ProtonEngineExampleTest extends EngineTestBase
         pumpServerToClient();
         assertEndpointState(getClient().session, ACTIVE, ACTIVE);
 
-
-
         LOGGER.fine(bold("======== About to create sender"));
 
         getClient().source = new Source();
@@ -138,8 +132,6 @@ public class ProtonEngineExampleTest extends EngineTestBase
 
         pumpClientToServer();
 
-
-
         LOGGER.fine(bold("======== About to set up implicitly created 
receiver"));
 
         // A real application would be interested in more states than simply 
ACTIVE, as there
@@ -166,7 +158,6 @@ public class ProtonEngineExampleTest extends EngineTestBase
         getServer().receiver.flow(1);
         pumpServerToClient();
 
-
         LOGGER.fine(bold("======== About to create a message and send it to 
the server"));
 
         getClient().message = Proton.message();
@@ -189,7 +180,6 @@ public class ProtonEngineExampleTest extends EngineTestBase
 
         pumpClientToServer();
 
-
         LOGGER.fine(bold("======== About to process the message on the 
server"));
 
         getServer().delivery = getServer().connection.getWorkHead();
@@ -217,7 +207,6 @@ public class ProtonEngineExampleTest extends EngineTestBase
         pumpServerToClient();
         assertEquals(Accepted.getInstance(), 
getClient().delivery.getRemoteState());
 
-
         LOGGER.fine(bold("======== About to accept and settle the message on 
the client"));
 
         Delivery clientDelivery = getClient().connection.getWorkHead();
@@ -232,7 +221,6 @@ public class ProtonEngineExampleTest extends EngineTestBase
 
         pumpClientToServer();
 
-
         LOGGER.fine(bold("======== About to settle the message on the 
server"));
 
         assertEquals(Accepted.getInstance(), 
getServer().delivery.getRemoteState());
@@ -250,14 +238,12 @@ public class ProtonEngineExampleTest extends 
EngineTestBase
         getServer().receiver.flow(1);
         pumpServerToClient();
 
-
         LOGGER.fine(bold("======== About to close client's sender"));
 
         getClient().sender.close();
 
         pumpClientToServer();
 
-
         LOGGER.fine(bold("======== Server about to process client's link 
closure"));
 
         assertSame(getServer().receiver, 
getServer().connection.linkHead(of(ACTIVE), of(CLOSED)));
@@ -265,14 +251,12 @@ public class ProtonEngineExampleTest extends 
EngineTestBase
 
         pumpServerToClient();
 
-
         LOGGER.fine(bold("======== About to close client's session"));
 
         getClient().session.close();
 
         pumpClientToServer();
 
-
         LOGGER.fine(bold("======== Server about to process client's session 
closure"));
 
         assertSame(getServer().session, 
getServer().connection.sessionHead(of(ACTIVE), of(CLOSED)));
@@ -280,14 +264,12 @@ public class ProtonEngineExampleTest extends 
EngineTestBase
 
         pumpServerToClient();
 
-
         LOGGER.fine(bold("======== About to close client's connection"));
 
         getClient().connection.close();
 
         pumpClientToServer();
 
-
         LOGGER.fine(bold("======== Server about to process client's connection 
closure"));
 
         assertEquals(CLOSED, getServer().connection.getRemoteState());
@@ -295,10 +277,8 @@ public class ProtonEngineExampleTest extends EngineTestBase
 
         pumpServerToClient();
 
-
         LOGGER.fine(bold("======== Checking client has nothing more to pump"));
 
-
         assertClientHasNothingToOutput();
 
         LOGGER.fine(bold("======== Done!"));
@@ -324,16 +304,12 @@ public class ProtonEngineExampleTest extends 
EngineTestBase
         getServer().connection = Proton.connection();
         getServer().transport.bind(getServer().connection);
 
-
-
         LOGGER.fine(bold("======== About to open connections"));
         getClient().connection.open();
         getServer().connection.open();
 
         doOutputInputCycle();
 
-
-
         LOGGER.fine(bold("======== About to open and close client session"));
         getClient().session = getClient().connection.session();
         getClient().session.open();
@@ -352,14 +328,12 @@ public class ProtonEngineExampleTest extends 
EngineTestBase
         pumpServerToClient();
         assertEndpointState(getClient().session, CLOSED, CLOSED);
 
-
         LOGGER.fine(bold("======== About to close client's connection"));
 
         getClient().connection.close();
 
         pumpClientToServer();
 
-
         LOGGER.fine(bold("======== Server about to process client's connection 
closure"));
 
         assertEquals(CLOSED, getServer().connection.getRemoteState());
@@ -367,17 +341,13 @@ public class ProtonEngineExampleTest extends 
EngineTestBase
 
         pumpServerToClient();
 
-
         LOGGER.fine(bold("======== Checking client has nothing more to pump"));
 
-
         assertClientHasNothingToOutput();
 
         LOGGER.fine(bold("======== Done!"));
     }
 
-
-
     /**
      * Simulates creating a local terminus using the properties supplied by 
the remote link endpoint.
      *


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to