// A war with a maxInactive of 3 secs and a maxUnreplicated of 1
JBossCacheManager[] mgrs = getCacheManagers(warname, 3, 1);
JBossCacheManager jbcm0 = mgrs[0];
JBossCacheManager jbcm1 = mgrs[1];
SetAttributesRequestHandler setHandler = new SetAttributesRequestHandler(allAttributes, false);
SessionTestUtil.invokeRequest(jbcm0, setHandler, null);
// Sleep less than the maxUnreplicated time so next request shouldn't trigger timestamp repl
Thread.sleep(500);
// Now make a request that will not trigger replication unless the interval is exceeded
BasicRequestHandler getHandler = new BasicRequestHandler(immutables.keySet(), false);
SessionTestUtil.invokeRequest(jbcm0, getHandler, setHandler.getSessionId());
validateExpectedAttributes(immutables, getHandler);
// Sleep long enough that the session will be expired on other server
// if previous request didn't keep it alive
Thread.sleep(2600);
// Fail over and confirm the session was expired
getHandler = new BasicRequestHandler(allAttributes.keySet(), false);
SessionTestUtil.invokeRequest(jbcm1, getHandler, setHandler.getSessionId());
validateNewSession(getHandler);
}