assertFalse("Passivation is disabled", mgr.isPassivationEnabled());
assertEquals("Correct max active count", 2, mgr.getMaxActiveAllowed());
// Set up a session
Session sess1 = createAndUseSession(mgr, "1", true, true);
assertEquals("Session count correct", 1, mgr.getActiveSessionCount());
assertEquals("Local session count correct", 1, mgr.getLocalActiveSessionCount());
createAndUseSession(mgr, "2", true, true);
assertEquals("Session count correct", 2, mgr.getActiveSessionCount());
assertEquals("Local session count correct", 2, mgr.getLocalActiveSessionCount());
// Should fail to create a 3rd
createAndUseSession(mgr, "3", false, false);
// Confirm a session timeout clears space
sess1.setMaxInactiveInterval(1);
SessionTestUtil.sleepThread(1100);
createAndUseSession(mgr, "3", true, true);
assertEquals("Session count correct", 2, mgr.getActiveSessionCount());