File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
test/src/com/rabbitmq/client/test/functional Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -60,10 +60,9 @@ public void testExpiryWhenConsumerIsLateToTheParty() throws Exception {
6060 }
6161
6262 public void testRestartingExpiry () throws Exception {
63- final String restartDelay = "5000 " ;
63+ final String restartDelay = "2000 " ;
6464 declareDurableQueue (TTL_QUEUE_NAME );
65- bindQueue ();
66- channel .basicPublish (TTL_EXCHANGE , TTL_QUEUE_NAME ,
65+ channel .basicPublish ("" , TTL_QUEUE_NAME ,
6766 MessageProperties .MINIMAL_PERSISTENT_BASIC
6867 .builder ()
6968 .expiration (restartDelay )
@@ -75,6 +74,9 @@ public void testRestartingExpiry() throws Exception {
7574 public void run () {
7675 try {
7776 Thread .sleep (Integer .parseInt (restartDelay ));
77+ while (channel == null || !channel .isOpen ()) {
78+ Thread .sleep (250 );
79+ }
7880 retrievedMsg = get ();
7981 } catch (IOException e ) {
8082 } catch (InterruptedException e ) {
You can’t perform that action at this time.
0 commit comments