Skip to content

Commit

Permalink
stop specifying the delivery tag, just use the senders own generated tag
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmellr committed Apr 12, 2017
1 parent 98abbf4 commit d2d9231
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/test/java/io/vertx/proton/ProtonClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import java.util.concurrent.atomic.AtomicInteger;

import static io.vertx.proton.ProtonHelper.message;
import static io.vertx.proton.ProtonHelper.tag;

@RunWith(VertxUnitRunner.class)
public class ProtonClientTest extends MockServerTestBase {
Expand Down Expand Up @@ -156,7 +155,7 @@ public void testRemoteDisconnectHandling(TestContext context) {

// Send a request to the server for him to disconnect us
ProtonSender sender = connection.createSender(null).open();
sender.send(tag(""), message("command", "disconnect"));
sender.send(message("command", "disconnect"));
});
}

Expand Down Expand Up @@ -199,7 +198,7 @@ private void sendReceiveEcho(TestContext context, String data) {
async.complete();
}).open();

connection.createSender(MockServer.Addresses.echo.toString()).open().send(tag(""), message("echo", data));
connection.createSender(MockServer.Addresses.echo.toString()).open().send(message("echo", data));

});
}
Expand Down Expand Up @@ -243,7 +242,7 @@ public void testAnonymousSenderEnforcesMessageHasAddress(TestContext context) {
ProtonSender sender = connection.createSender(null);
Message messageWithNoAddress = Proton.message();
try {
sender.send(tag("t1"), messageWithNoAddress);
sender.send(messageWithNoAddress);
context.fail("Send should have thrown IAE due to lack of message address");
} catch (IllegalArgumentException iae) {
// Expected
Expand All @@ -260,7 +259,7 @@ public void testNonAnonymousSenderDoesNotEnforceMessageHasAddress(TestContext co
connection.open();
ProtonSender sender = connection.createSender(MockServer.Addresses.drop.toString());
Message messageWithNoAddress = Proton.message();
sender.send(tag("t1"), messageWithNoAddress);
sender.send(messageWithNoAddress);
connection.disconnect();
async.complete();
});
Expand Down Expand Up @@ -289,7 +288,7 @@ public void testDefaultAnonymousSenderSpecifiesLinkTarget(TestContext context) t
// to await remote sender open completing or credit to send being
// granted. But here we will just buffer the send immediately.
sender.open();
sender.send(tag("tag"), message("ignored", "content"));
sender.send(message("ignored", "content"));
}).open();
});

Expand Down

0 comments on commit d2d9231

Please sign in to comment.