use of org.eclipse.scout.rt.platform.DefaultPlatform in project scout.rt by eclipse.
the class ClientSessionDisposeTest method testDispose.
/**
* Test might fail when manually debugged.
*/
@Test
public void testDispose() throws Exception {
Platform.set(new DefaultPlatform());
Platform.get().start();
Platform.get().awaitPlatformStarted();
TestingUtility.registerBean(new BeanMetaData(TestEnvironmentClientSession.class));
IClientSession session = BEANS.get(ClientSessionProvider.class).provide(ClientRunContexts.empty().withUserAgent(UserAgents.createDefault()));
WeakReference<IClientSession> ref = new WeakReference<IClientSession>(session);
session.stop();
assertTrue(session.isStopping());
session = null;
TestingUtility.assertGC(ref);
Platform.get().stop();
}
use of org.eclipse.scout.rt.platform.DefaultPlatform in project scout.rt by eclipse.
the class ClientSessionTest method before.
@Before
public void before() {
Platform.set(new DefaultPlatform());
Platform.get().start();
Platform.get().awaitPlatformStarted();
}
Aggregations