Skip to content

Commit c26df22

Browse files
author
Simon MacMullen
committed
Replace a homebrew checkShutdownSignal alternative.
1 parent 44b689a commit c26df22

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

test/src/com/rabbitmq/client/test/server/Permissions.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -287,16 +287,7 @@ protected void runTest(boolean exp, String name, WithName test)
287287
test.with(name);
288288
assertTrue(msg, exp);
289289
} catch (IOException e) {
290-
assertFalse(msg, exp);
291-
Throwable t = e.getCause();
292-
assertTrue(msg, t instanceof ShutdownSignalException);
293-
Object r = ((ShutdownSignalException)t).getReason();
294-
assertTrue(msg, r instanceof Command);
295-
Method m = ((Command)r).getMethod();
296-
assertTrue(msg, m instanceof AMQP.Channel.Close);
297-
assertEquals(msg,
298-
AMQP.ACCESS_REFUSED,
299-
((AMQP.Channel.Close)m).getReplyCode());
290+
checkShutdownSignal(AMQP.ACCESS_REFUSED, e);
300291
//This fails due to bug 20296
301292
//openChannel();
302293
channel = connection.createChannel(channel.getChannelNumber() + 1);

0 commit comments

Comments
 (0)