Null check for hazelcastInstance

Previously if the hazelcastInstance failed to start we would get a
NPE when the tests ended. This would mask the original issue of starting
the hazelcastInstance.

This commit ensures that hazelcastInstance is non-null before trying to
shut it down.

Polish gh-360
Relates to gh-360
This commit is contained in:
Rob Winch
2016-02-09 08:24:33 -06:00
parent bf7729b936
commit 5f23b3c272

View File

@@ -59,7 +59,9 @@ public class HazelcastClientRepositoryITests<S extends ExpiringSession>
@AfterClass
public static void teardown() {
hazelcastInstance.shutdown();
if(hazelcastInstance != null) {
hazelcastInstance.shutdown();
}
}
@Configuration