Skip to content

Commit 50bfe48

Browse files
author
Tim Watson
committed
make sure we treat bytes as unsigned in per-message ttl tests and sync properly
1 parent 28a4164 commit 50bfe48

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/src/com/rabbitmq/client/test/functional/PerMessageTTL.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ protected void releaseResources() throws IOException {
2121
}
2222

2323
public void testSupportedTTLTypes() throws IOException {
24-
Object[] args = { (byte)200, (short)200, 200, 200L };
24+
Object[] args = { (((byte)200) & (0xff)), (short)200, 200, 200L };
2525
for (Object ttl : args) {
2626
try {
27-
publish(MSG[0], ttl);
28-
this.channel.waitForConfirmsOrDie();
27+
publishAndSynchronise(MSG[0], ttl);
2928
} catch(Exception ex) {
3029
fail("Should be able to use " + ttl.getClass().getName() +
3130
" for basic.expiration: " + ex.getMessage());

0 commit comments

Comments
 (0)