Issue #6309 remove duplicate commented out session test (#6310) (#6318)

Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
Jan Bartel 2021-05-25 09:57:59 +10:00 committed by GitHub
parent 04df6d4ec2
commit 487e4e4f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 45 deletions

View File

@ -214,51 +214,6 @@ public class DefaultSessionCacheTest extends AbstractSessionCacheTest
}
}
/**
* Test sessions are saved when shutdown with a store.
*/
/* @Test
public void testNoInvalidateOnShutdown()
throws Exception
{
Server server = new Server();
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
context.setContextPath("/test");
context.setServer(server);
server.setHandler(context);
AbstractSessionCacheFactory cacheFactory = newSessionCacheFactory(SessionCache.NEVER_EVICT, false, false, false, false);
DefaultSessionCache cache = (DefaultSessionCache)cacheFactory.getSessionCache(context.getSessionHandler());
TestSessionDataStore store = new TestSessionDataStore(true);//fake passivation
cache.setSessionDataStore(store);
context.getSessionHandler().setSessionCache(cache);
server.start();
//put a session in the cache and store
long now = System.currentTimeMillis();
SessionData data = store.newSessionData("1234", now - 20, now - 10, now - 20, TimeUnit.MINUTES.toMillis(10));
Session session = cache.newSession(data);
TestSessionActivationListener listener = new TestSessionActivationListener();
cache.add("1234", session);
assertTrue(cache.contains("1234"));
session.setAttribute("aaa", listener);
cache.release("1234", session);
assertTrue(store.exists("1234"));
assertTrue(cache.contains("1234"));
server.stop(); //calls shutdown
assertTrue(store.exists("1234"));
assertFalse(cache.contains("1234"));
assertEquals(2, listener.passivateCalls);
assertEquals(1, listener.activateCalls);
}
*/
/**
* Test that a session id can be renewed.
*/