Skip to content

Commit 1b49c03

Browse files
author
Matthew Sackman
committed
Minor improvements to the java tests
1 parent 8c2f2ca commit 1b49c03

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/src/com/rabbitmq/client/test/functional/QueueLeaseExpires.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,25 +128,22 @@ public void testQueueRedeclareEquivalence() throws IOException {
128128

129129
void verifyQueueExpires(String name, boolean expire) throws IOException,
130130
InterruptedException {
131-
int interval = SHOULD_EXPIRE_WITHIN / 4;
132-
133131
Map<String, Object> args = new HashMap<String, Object>();
134132
if (expire) {
135133
args.put("x-expires", QUEUE_EXPIRES);
136134
}
137-
;
138135

139136
channel.queueDeclare(name, false, false, false, args);
140137

141-
Thread.sleep(interval);
138+
Thread.sleep(SHOULD_EXPIRE_WITHIN / 4);
142139

143140
try {
144141
channel.queueDeclarePassive(name);
145142
} catch (IOException e) {
146143
fail("Queue expired before deadline.");
147144
}
148145

149-
Thread.sleep(interval * 3);
146+
Thread.sleep(SHOULD_EXPIRE_WITHIN); // be on the safe side
150147

151148
try {
152149
channel.queueDeclarePassive(name);

0 commit comments

Comments
 (0)