@@ -46,7 +46,7 @@ public class QueueLease extends BrokerTestCase {
4646
4747 // Currently the expiration timer is very responsive but this may
4848 // very well change in the future, so tweak accordingly.
49- private final static long QUEUE_EXPIRES = 1000L ; // msecs
49+ private final static int QUEUE_EXPIRES = 1000 ; // msecs
5050 private final static int SHOULD_EXPIRE_WITHIN = 2000 ;
5151
5252 /**
@@ -67,25 +67,25 @@ public void testDoesNotExpireOthers() throws IOException,
6767
6868 /**
6969 * Verify that the server throws an error if the type of x-expires is not
70- * long .
70+ * int .
7171 */
72- public void testExpireMustBeLong () throws IOException {
72+ public void testExpireMustBeInt () throws IOException {
7373 Map <String , Object > args = new HashMap <String , Object >();
74- args .put ("x-expires" , 100 );
74+ args .put ("x-expires" , 100L );
7575
7676 try {
7777 channel
7878 .queueDeclare ("expiresMustBeLong" , false , false , false ,
7979 args );
80- fail ("server accepted x-expires not of type long " );
80+ fail ("server accepted x-expires not of type int " );
8181 } catch (IOException e ) {
8282 checkShutdownSignal (AMQP .PRECONDITION_FAILED , e );
8383 }
8484 }
8585
8686 public void testExpireMustBeGtZero () throws IOException {
8787 Map <String , Object > args = new HashMap <String , Object >();
88- args .put ("x-expires" , 0L );
88+ args .put ("x-expires" , 0 );
8989
9090 try {
9191 channel .queueDeclare ("expiresMustBeGtZero" , false , false , false ,
@@ -98,7 +98,7 @@ public void testExpireMustBeGtZero() throws IOException {
9898
9999 public void testExpireMustBePositive () throws IOException {
100100 Map <String , Object > args = new HashMap <String , Object >();
101- args .put ("x-expires" , -10L );
101+ args .put ("x-expires" , -10 );
102102
103103 try {
104104 channel .queueDeclare ("expiresMustBePositive" , false , false , false ,
@@ -115,9 +115,9 @@ public void testExpireMustBePositive() throws IOException {
115115 */
116116 public void testQueueRedeclareEquivalence () throws IOException {
117117 Map <String , Object > args1 = new HashMap <String , Object >();
118- args1 .put ("x-expires" , 10000L );
118+ args1 .put ("x-expires" , 10000 );
119119 Map <String , Object > args2 = new HashMap <String , Object >();
120- args2 .put ("x-expires" , 20000L );
120+ args2 .put ("x-expires" , 20000 );
121121
122122 channel .queueDeclare (TEST_EXPIRE_REDECLARE_QUEUE , false , false , false ,
123123 args1 );
@@ -145,6 +145,7 @@ void verifyQueueExpires(String name, boolean expire) throws IOException,
145145 try {
146146 channel .queueDeclarePassive (name );
147147 } catch (IOException e ) {
148+ checkShutdownSignal (AMQP .NOT_FOUND , e );
148149 fail ("Queue expired before deadline." );
149150 }
150151
0 commit comments