[java-opensaml COMMIT] /trunk/opensaml-util/src/test/java/org/opensaml/util/storage/ReplayCacheTest.java
noreply at shibboleth.net
noreply at shibboleth.net
Mon Jun 3 18:18:52 EDT 2013
Author: scantor
Date: Mon Jun 3 18:18:52 2013
New Revision: 3364
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3364&view=rev
Log:
Switch to milliseconds for expirations.
Modified:
trunk/opensaml-util/src/test/java/org/opensaml/util/storage/ReplayCacheTest.java
Modified: trunk/opensaml-util/src/test/java/org/opensaml/util/storage/ReplayCacheTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-util/src/test/java/org/opensaml/util/storage/ReplayCacheTest.java?rev=3364&r1=3363&r2=3364&view=diff
==============================================================================
--- trunk/opensaml-util/src/test/java/org/opensaml/util/storage/ReplayCacheTest.java (original)
+++ trunk/opensaml-util/src/test/java/org/opensaml/util/storage/ReplayCacheTest.java Mon Jun 3 18:18:52 2013
@@ -42,7 +42,7 @@
protected void setUp() throws Exception {
context = getClass().getName();
messageID = "abc123";
- expiration = System.currentTimeMillis() / 1000 + 180;
+ expiration = System.currentTimeMillis() + 180000;
storageService = new MemoryStorageService();
storageService.initialize();
@@ -103,13 +103,13 @@
@Test
public void testNonReplayValidByMillisecondExpiriation() throws InterruptedException {
- Assert.assertTrue(replayCache.check(context, messageID, System.currentTimeMillis() / 1000 + 1),
+ Assert.assertTrue(replayCache.check(context, messageID, System.currentTimeMillis() + 1000),
"Message was not replay, insert into empty cache");
// Sleep for 2 seconds to make sure replay cache entry has expired
Thread.sleep(2000L);
- Assert.assertTrue(replayCache.check(context, messageID, System.currentTimeMillis() / 1000 + 1),
+ Assert.assertTrue(replayCache.check(context, messageID, System.currentTimeMillis() + 1000),
"Message was not replay, previous cache entry should have expired");
}
}
More information about the commits
mailing list