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 {
60
60
}
61
61
62
62
public void testRestartingExpiry () throws Exception {
63
- final String restartDelay = "5000 " ;
63
+ final String restartDelay = "2000 " ;
64
64
declareDurableQueue (TTL_QUEUE_NAME );
65
- bindQueue ();
66
- channel .basicPublish (TTL_EXCHANGE , TTL_QUEUE_NAME ,
65
+ channel .basicPublish ("" , TTL_QUEUE_NAME ,
67
66
MessageProperties .MINIMAL_PERSISTENT_BASIC
68
67
.builder ()
69
68
.expiration (restartDelay )
@@ -75,6 +74,9 @@ public void testRestartingExpiry() throws Exception {
75
74
public void run () {
76
75
try {
77
76
Thread .sleep (Integer .parseInt (restartDelay ));
77
+ while (channel == null || !channel .isOpen ()) {
78
+ Thread .sleep (250 );
79
+ }
78
80
retrievedMsg = get ();
79
81
} catch (IOException e ) {
80
82
} catch (InterruptedException e ) {
You can’t perform that action at this time.
0 commit comments