Skip to content

Commit

Permalink
Minor change to test case. (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
yvgopal authored Nov 6, 2019
1 parent 812bf7e commit 078f1a0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,14 @@ public void testRenewSessionLock() throws InterruptedException, ServiceBusExcept
String sessionId = TestUtils.getRandomString();
this.session = ClientFactory.acceptSessionFromEntityPath(this.factory, this.receiveEntityPath, sessionId, ReceiveMode.PEEKLOCK);
Instant initialValidity = this.session.getLockedUntilUtc();
Thread.sleep(1000);
this.session.renewSessionLock();
Instant renewedValidity = this.session.getLockedUntilUtc();
Assert.assertTrue("RenewSessionLock did not renew session lockeduntil time.", renewedValidity.isAfter(initialValidity));
Assert.assertTrue("RenewSessionLock did not renew session lockeduntil time. Before :" + initialValidity.toString() + ", After:" + renewedValidity.toString(), renewedValidity.isAfter(initialValidity));
Thread.sleep(1000);
this.session.renewSessionLock();
Instant renewedValidity2 = this.session.getLockedUntilUtc();
Assert.assertTrue("RenewSessionLock did not renew session lockeduntil time.", renewedValidity2.isAfter(renewedValidity));
Assert.assertTrue("RenewSessionLock did not renew session lockeduntil time. Before :" + renewedValidity.toString() + ", After:" + renewedValidity2.toString(), renewedValidity2.isAfter(renewedValidity));
}

@Test
Expand Down

0 comments on commit 078f1a0

Please sign in to comment.