Skip to content

Commit 078f1a0

Browse files
authored
Minor change to test case. (#389)
1 parent 812bf7e commit 078f1a0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

azure-servicebus/src/test/java/com/microsoft/azure/servicebus/SessionTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,14 @@ public void testRenewSessionLock() throws InterruptedException, ServiceBusExcept
282282
String sessionId = TestUtils.getRandomString();
283283
this.session = ClientFactory.acceptSessionFromEntityPath(this.factory, this.receiveEntityPath, sessionId, ReceiveMode.PEEKLOCK);
284284
Instant initialValidity = this.session.getLockedUntilUtc();
285+
Thread.sleep(1000);
285286
this.session.renewSessionLock();
286287
Instant renewedValidity = this.session.getLockedUntilUtc();
287-
Assert.assertTrue("RenewSessionLock did not renew session lockeduntil time.", renewedValidity.isAfter(initialValidity));
288+
Assert.assertTrue("RenewSessionLock did not renew session lockeduntil time. Before :" + initialValidity.toString() + ", After:" + renewedValidity.toString(), renewedValidity.isAfter(initialValidity));
289+
Thread.sleep(1000);
288290
this.session.renewSessionLock();
289291
Instant renewedValidity2 = this.session.getLockedUntilUtc();
290-
Assert.assertTrue("RenewSessionLock did not renew session lockeduntil time.", renewedValidity2.isAfter(renewedValidity));
292+
Assert.assertTrue("RenewSessionLock did not renew session lockeduntil time. Before :" + renewedValidity.toString() + ", After:" + renewedValidity2.toString(), renewedValidity2.isAfter(renewedValidity));
291293
}
292294

293295
@Test

0 commit comments

Comments
 (0)