use of org.atmosphere.cache.UUIDBroadcasterCache in project atmosphere by Atmosphere.
the class BroadcasterCacheTest method testBasicExcludeCache.
@Test
public void testBasicExcludeCache() throws ExecutionException, InterruptedException, ServletException {
BroadcasterCache cache = new UUIDBroadcasterCache();
cache.configure(config);
AtmosphereResource r = config.resourcesFactory().create(broadcaster.getBroadcasterConfig().getAtmosphereConfig(), "1234567");
cache.excludeFromCache(broadcaster.getID(), r);
broadcaster.getBroadcasterConfig().setBroadcasterCache(cache);
broadcaster.removeAtmosphereResource(r);
broadcaster.broadcast("foo").get();
List<Object> l = cache.retrieveFromCache(broadcaster.getID(), ar.uuid());
assertNotNull(l);
assertEquals(l.isEmpty(), true);
}
Aggregations