Skip to content

Commit 1048c34

Browse files
author
Emile Joubert
committed
Added negative semantic equivalence test
1 parent db67373 commit 1048c34

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,16 @@ public void testQueueRedeclareSemanticEquivalence() throws Exception {
122122
declareQueue(TTL_QUEUE_NAME, 10L);
123123
}
124124

125+
public void testQueueRedeclareSemanticNonEquivalence() throws Exception {
126+
declareQueue(TTL_QUEUE_NAME, 10);
127+
try {
128+
declareQueue(TTL_QUEUE_NAME, 10.0);
129+
fail("Should not be able to redeclare with argument of different type");
130+
} catch(IOException ex) {
131+
checkShutdownSignal(AMQP.PRECONDITION_FAILED, ex);
132+
}
133+
}
134+
125135
/*
126136
* Test messages expire when using basic get.
127137
*/

0 commit comments

Comments
 (0)