/** Tests named grid */ public void testNamedGridGetOrStart() throws Exception { IgniteConfiguration cfg = getConfiguration("test"); try (Ignite ignite = Ignition.getOrStart(cfg)) { try { Ignition.start(cfg); fail("Expected exception after grid started"); } catch (IgniteException ignored) { // No-op. } Ignite ignite2 = Ignition.getOrStart(cfg); assertEquals("Must return same instance", ignite, ignite2); } assertTrue(G.allGrids().isEmpty()); }