File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,39 @@ public void testConfirmMultipleQueues()
127127 Thread .sleep (10 );
128128 }
129129
130+ /* For testConfirmQueueDelete and testConfirmQueuePurge to be
131+ * relevant, the msg_store must not write the messages to disk
132+ * (thus causing a confirm). I'd manually comment out the line in
133+ * internal_sync that notifies the clients. */
134+
135+ public void testConfirmQueueDelete ()
136+ throws IOException , InterruptedException
137+ {
138+ for (long i = 0 ; i < NUM_MESSAGES ; i ++) {
139+ publish ("confirm-test-noconsumer" , true , false , false );
140+ ackSet .add (i );
141+ }
142+
143+ channel .queueDelete ("confirm-test-noconsumer" );
144+
145+ while (ackSet .size () > 0 )
146+ Thread .sleep (10 );
147+ }
148+
149+ public void testConfirmQueuePurge ()
150+ throws IOException , InterruptedException
151+ {
152+ for (long i = 0 ; i < NUM_MESSAGES ; i ++) {
153+ publish ("confirm-test-noconsumer" , true , false , false );
154+ ackSet .add (i );
155+ }
156+
157+ channel .queuePurge ("confirm-test-noconsumer" );
158+
159+ while (ackSet .size () > 0 )
160+ Thread .sleep (10 );
161+ }
162+
130163 /* Publish NUM_MESSAGES persistent messages and wait for
131164 * confirmations. */
132165 public void confirmTest (String queueName , boolean persistent ,
You can’t perform that action at this time.
0 commit comments