[java-identity-provider COMMIT] in /trunk/idp-session-impl/src: main/java/net/shibboleth/idp/session/impl/StorageBack...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Oct 3 14:12:57 EDT 2013
Author: scantor
Date: Thu Oct 3 14:12:57 2013
New Revision: 4823
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4823&view=rev
Log:
Add a bit of logging.
Modified:
trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedIdPSession.java
trunk/idp-session-impl/src/test/java/net/shibboleth/idp/session/impl/StorageBackedSessionManagerTest.java
Modified: trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedIdPSession.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedIdPSession.java?rev=4823&r1=4822&r2=4823&view=diff
==============================================================================
--- trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedIdPSession.java (original)
+++ trunk/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/StorageBackedIdPSession.java Thu Oct 3 14:12:57 2013
@@ -487,11 +487,11 @@
}
try {
- final StorageRecord<AuthenticationResult> record =
- sessionManager.getStorageService().read(getId(), flowId);
+ final StorageRecord<AuthenticationResult> record = sessionManager.getStorageService().read(getId(), flowId);
if (record != null) {
return record.getValue(flow, getId(), flowId);
} else {
+ log.debug("No AuthenticationResult for flow {} in session {}", flowId, getId());
return null;
}
} catch (IOException e) {
@@ -563,6 +563,7 @@
try {
final StorageRecord<ServiceSession> record = sessionManager.getStorageService().read(getId(), key);
if (record == null) {
+ log.debug("No ServiceSession found for service {} in session {}", serviceId, getId());
return null;
}
Modified: trunk/idp-session-impl/src/test/java/net/shibboleth/idp/session/impl/StorageBackedSessionManagerTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-session-impl/src/test/java/net/shibboleth/idp/session/impl/StorageBackedSessionManagerTest.java?rev=4823&r1=4822&r2=4823&view=diff
==============================================================================
--- trunk/idp-session-impl/src/test/java/net/shibboleth/idp/session/impl/StorageBackedSessionManagerTest.java (original)
+++ trunk/idp-session-impl/src/test/java/net/shibboleth/idp/session/impl/StorageBackedSessionManagerTest.java Thu Oct 3 14:12:57 2013
@@ -200,6 +200,11 @@
Assert.assertEquals(foo.getAuthenticationInstant(), foo2.getAuthenticationInstant());
Assert.assertEquals(foo.getLastActivityInstant(), foo2.getLastActivityInstant());
Assert.assertEquals(foo.getSubject(), foo2.getSubject());
+
+ // Test removal while multiple objects are active.
+ session2 = manager.resolveSingle(new CriteriaSet(new SessionIdCriterion(session.getId())));
+ Assert.assertTrue(session.removeAuthenticationResult(foo));
+ Assert.assertNull(session2.getAuthenticationResult("AuthenticationFlow/Foo"));
}
@Test(threadPoolSize = 10, invocationCount = 10, timeOut = 10000)
@@ -239,6 +244,11 @@
Assert.assertNotNull(foo2);
Assert.assertEquals(foo.getCreationInstant(), foo2.getCreationInstant());
Assert.assertEquals(foo.getExpirationInstant(), foo2.getExpirationInstant());
+
+ // Test removal while multiple objects are active.
+ session2 = manager.resolveSingle(new CriteriaSet(new SessionIdCriterion(session.getId())));
+ Assert.assertTrue(session.removeServiceSession(foo));
+ Assert.assertNull(session2.getServiceSession("https://sp.example.org/shibboleth"));
}
}
More information about the commits
mailing list