Skip to content

Commit 033c4a1

Browse files
saikiran939jfarcand
authored andcommitted
ISSUE Atmosphere#2186 Broadcaster objects cleanup - correcting junit
1 parent ff7d4b3 commit 033c4a1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

modules/cpr/src/test/java/org/atmosphere/cpr/BroadcasterTest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,12 @@ public void onPreDestroy(Broadcaster b) {
256256

257257
@Test
258258
public void shouldCleanUpBroadcasterUponDestory(){
259-
AtmosphereConfig config = config.getAtmosphereConfig();
260259
DefaultBroadcasterFactory broadcasterFactory = new DefaultBroadcasterFactory(SimpleBroadcaster.class, "NEVER", config);
261-
mFramework.setBroadcasterFactory(broadcasterFactory);
262260
Broadcaster b1 = broadcasterFactory.lookup("/LEAK/EXISTS", true);
263261

264-
Assert.assertEquals(1, mMonitorStatistics.getServerPushConnectionsCount());
265-
266262
b1.destroy();
267-
268-
Assert.assertEquals(0, mMonitorStatistics.getServerPushConnectionsCount());
263+
264+
Assert.assertNull(broadcasterFactory.lookup("/LEAJ/EXISTS"));
269265
}
270266

271267
@Test

0 commit comments

Comments
 (0)