@@ -96,7 +96,9 @@ protected void releaseResources() throws IOException {
9696 {
9797 declareQueue ("inequivalent_dlx_name" , "dlx_foo" , null , null );
9898 try {
99- declareQueue ("inequivalent_dlx_name" , "dlx_bar" , null , null );
99+ Map <String , Object > args = new HashMap <>();
100+ args .put (DLX_ARG , "dlx_bar" );
101+ channel .queueDeclare ("inequivalent_dlx_name" , true , false , false , args );
100102 fail ("x-dead-letter-exchange must be a valid exchange name " +
101103 "and must not change in subsequent declarations" );
102104 } catch (IOException ex ) {
@@ -118,7 +120,10 @@ protected void releaseResources() throws IOException {
118120 {
119121 declareQueue ("inequivalent_dlx_rk" , "amq.direct" , "dlx_rk" , null );
120122 try {
121- declareQueue ("inequivalent_dlx_rk" , "amq.direct" , "dlx_rk2" , null );
123+ Map <String , Object > args = new HashMap <>();
124+ args .put (DLX_ARG , "amq.direct" );
125+ args .put (DLX_RK_ARG , "dlx_rk2" );
126+ channel .queueDeclare ("inequivalent_dlx_rk" , true , false , false , args );
122127 fail ("x-dead-letter-routing-key must be a string and must not " +
123128 "change in subsequent declarations" );
124129 } catch (IOException ex ) {
0 commit comments