IgniteServiceConfigVariationsFullApiTest must undeploy services in a finally block
@@ -211,10 +211,12 @@ public class IgniteServiceConfigVariationsFullApiTest extends IgniteConfigVariat
* @throws Exception If failed.
*/
protected void testService(TestService svc, boolean sticky, DeployClosure deployC) throws Exception {
+ IgniteServices services;
IgniteEx ignite = testedGrid();
- IgniteServices services = ignite.services();
+ services = ignite.services();
+ try {
Object expected = value(++cntr);
// Put value for testing Service instance serialization.
@@ -243,7 +245,8 @@ public class IgniteServiceConfigVariationsFullApiTest extends IgniteConfigVariat
assertEquals(expected, proxy.getValue());
assertEquals("Expected 1 deployed service", 1, services.serviceDescriptors().size());
-
+ }
+ finally {
// Randomize stop method invocation
boolean tmp = ThreadLocalRandom.current().nextBoolean();
@@ -252,6 +255,7 @@ public class IgniteServiceConfigVariationsFullApiTest extends IgniteConfigVariat
else
services.cancel(SERVICE_NAME);
}
+ }
/**
* Test service
