20
20
import static org .junit .Assert .assertNull ;
21
21
import static org .junit .Assert .fail ;
22
22
23
+ import com .rabbitmq .client .ShutdownSignalException ;
23
24
import java .io .IOException ;
24
25
25
26
import org .junit .Test ;
@@ -67,6 +68,8 @@ protected void releaseResources() throws IOException {
67
68
fail ("Should not be able to set TTL using non-numeric values" );
68
69
} catch (IOException e ) {
69
70
checkShutdownSignal (AMQP .PRECONDITION_FAILED , e );
71
+ } catch (ShutdownSignalException e ) {
72
+ checkShutdownSignal (AMQP .PRECONDITION_FAILED , e );
70
73
}
71
74
}
72
75
@@ -77,16 +80,20 @@ protected void releaseResources() throws IOException {
77
80
fail ("Should not be able to set TTL using non-numeric values" );
78
81
} catch (IOException e ) {
79
82
checkShutdownSignal (AMQP .PRECONDITION_FAILED , e );
83
+ } catch (ShutdownSignalException e ) {
84
+ checkShutdownSignal (AMQP .PRECONDITION_FAILED , e );
80
85
}
81
86
}
82
87
83
- @ Test public void tTLMustBePositive () throws Exception {
88
+ @ Test public void tTLMustBePositive () {
84
89
try {
85
90
declareAndBindQueue (-10 );
86
91
publishAndSync (MSG [0 ]);
87
92
fail ("Should not be able to set TTL using negative values" );
88
93
} catch (IOException e ) {
89
94
checkShutdownSignal (AMQP .PRECONDITION_FAILED , e );
95
+ } catch (ShutdownSignalException e ) {
96
+ checkShutdownSignal (AMQP .PRECONDITION_FAILED , e );
90
97
}
91
98
}
92
99
0 commit comments