Skip to content

Commit ed2e077

Browse files
author
Simon MacMullen
committed
Merge bug24481
2 parents 38bc04b + 1048c34 commit ed2e077

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,23 @@ public void testQueueRedeclareEquivalence() throws Exception {
115115
}
116116
}
117117

118+
public void testQueueRedeclareSemanticEquivalence() throws Exception {
119+
declareQueue(TTL_QUEUE_NAME, (byte)10);
120+
declareQueue(TTL_QUEUE_NAME, 10);
121+
declareQueue(TTL_QUEUE_NAME, (short)10);
122+
declareQueue(TTL_QUEUE_NAME, 10L);
123+
}
124+
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+
118135
/*
119136
* Test messages expire when using basic get.
120137
*/

0 commit comments

Comments
 (0)