public abstract class AbstractSessionDataStoreTest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
ANCIENT_TIMESTAMP
A timestamp representing a time that was close to the epoch, and thus
happened a long time ago.
|
static int |
GRACE_PERIOD_SEC |
static long |
RECENT_TIMESTAMP |
Constructor and Description |
---|
AbstractSessionDataStoreTest() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
checkSessionExists(SessionData data) |
abstract boolean |
checkSessionPersisted(SessionData data) |
abstract SessionDataStoreFactory |
createSessionDataStoreFactory() |
abstract void |
persistSession(SessionData data) |
abstract void |
persistUnreadableSession(SessionData data) |
void |
testDeleteSessionDoesNotExist()
Test deletion of non-existent session.
|
void |
testDeleteSessionExists()
Test that we can delete a persisted session.
|
void |
testExistsDifferentContext() |
void |
testExistsIsExpired()
Test the exist() method with a session that does exist and is expired
|
void |
testExistsNotExists()
Test the exist() method with a session that does not exist
|
void |
testExistsNotExpired()
Test the exist() method with a session that does exist and is not expired
|
void |
testGetExpiredDifferentNode()
Test SessionDataStore.getExpired: tests the situation where
there are sessions that are not in use on the node, but have
expired and are last used by another node.
|
void |
testGetExpiredNotPersisted()
Test SessionDataStore.getExpired: tests the situation where
the session candidates don't exist in the store.
|
void |
testGetExpiredPersistedAndExpired()
Test SessionDataStore.getExpired.
|
void |
testGetExpiredPersistedAndExpiredOnly()
Test SessionDataStore.getExpired: tests the situation where
there are more persisted expired sessions in the store than
present in the candidate list.
|
void |
testGetExpiredPersistedNotExpired()
Test SessionDataStore.getExpired: tests the situation where
the session candidates are not expired in the store.
|
void |
testLoadSessionDoesNotExist()
Test that a non-existent session cannot be loaded.
|
void |
testLoadSessionExists()
Test that we can load a persisted session.
|
void |
testLoadSessionExpired()
Test that an expired session can be loaded.
|
void |
testLoadSessionFails()
Test that a session that cannot be loaded throws exception.
|
void |
testSavePeriodDirtySession()
Check that a session whose attributes have changed will always
be saved despite the savePeriod
|
void |
testSavePeriodOnCreate()
Check that a session that has never previously been
saved will be saved despite the savePeriod setting.
|
void |
testSavePeriodOnUpdate()
Test setting a save period to avoid writes when the attributes haven't changed.
|
void |
testStoreObjectAttributes()
Test that the store can persist a session that contains
serializable objects in the attributes.
|
void |
testStoreSession()
Test that the store can persist a session.
|
void |
testUpdateSession()
Test that the store can update a pre-existing session.
|
public static final int GRACE_PERIOD_SEC
public static final long ANCIENT_TIMESTAMP
public static final long RECENT_TIMESTAMP
public abstract SessionDataStoreFactory createSessionDataStoreFactory()
public abstract void persistSession(SessionData data) throws java.lang.Exception
java.lang.Exception
public abstract void persistUnreadableSession(SessionData data) throws java.lang.Exception
java.lang.Exception
public abstract boolean checkSessionExists(SessionData data) throws java.lang.Exception
java.lang.Exception
public abstract boolean checkSessionPersisted(SessionData data) throws java.lang.Exception
java.lang.Exception
@Test public void testStoreSession() throws java.lang.Exception
java.lang.Exception
@Test public void testUpdateSession() throws java.lang.Exception
java.lang.Exception
@Test public void testStoreObjectAttributes() throws java.lang.Exception
java.lang.Exception
@Test public void testLoadSessionExists() throws java.lang.Exception
java.lang.Exception
@Test public void testLoadSessionExpired() throws java.lang.Exception
java.lang.Exception
@Test public void testLoadSessionDoesNotExist() throws java.lang.Exception
java.lang.Exception
@Test public void testLoadSessionFails() throws java.lang.Exception
java.lang.Exception
@Test public void testDeleteSessionExists() throws java.lang.Exception
java.lang.Exception
@Test public void testDeleteSessionDoesNotExist() throws java.lang.Exception
java.lang.Exception
@Test public void testGetExpiredPersistedAndExpired() throws java.lang.Exception
java.lang.Exception
@Test public void testGetExpiredPersistedNotExpired() throws java.lang.Exception
java.lang.Exception
@Test public void testGetExpiredNotPersisted() throws java.lang.Exception
java.lang.Exception
@Test public void testGetExpiredPersistedAndExpiredOnly() throws java.lang.Exception
java.lang.Exception
@Test public void testGetExpiredDifferentNode() throws java.lang.Exception
java.lang.Exception
@Test public void testExistsNotExpired() throws java.lang.Exception
java.lang.Exception
@Test public void testExistsIsExpired() throws java.lang.Exception
java.lang.Exception
@Test public void testExistsNotExists() throws java.lang.Exception
java.lang.Exception
@Test public void testExistsDifferentContext() throws java.lang.Exception
java.lang.Exception
@Test public void testSavePeriodOnUpdate() throws java.lang.Exception
java.lang.Exception
@Test public void testSavePeriodOnCreate() throws java.lang.Exception
java.lang.Exception
@Test public void testSavePeriodDirtySession() throws java.lang.Exception
java.lang.Exception
Copyright © 1995–2023 Webtide. All rights reserved.