/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { if (getSpiContext() != null) getSpiContext().addLocalEventListener(new DiscoveryListener()); pinger = new Pinger(); pinger.start(); }
/** * @throws Exception If failed. */ @Test public void testDiscovery() throws Exception { GridLocalEventListener discoLsnr = new DiscoveryListener(); getSpiContext().addLocalEventListener(discoLsnr); Pinger pinger = null; if (isPingerStart()) { pinger = new Pinger(); pinger.start(); } JOptionPane.showMessageDialog(null, "Press OK to end test."); if (pinger != null) pinger.interrupt(); }