Permalink
Browse files

Fixes to test cases.

If already connected to distributed system in CacheFactoryObject, disconnect and then connect again
  • Loading branch information...
1 parent fc8b07d commit 4921629e6f6fc7a6947788f5d6c4ecbb8149aa6f @markpollack markpollack committed Feb 1, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/Spring.Data.GemFire/CacheFactoryObject.cs
@@ -133,9 +133,13 @@ public void AfterPropertiesSet()
{
AssertUtils.ArgumentNotNull("name", name, "Cache name can not be null");
Properties gemfirePropertes = MergePropertes();
+ if (DistributedSystem.IsConnected)
+ {
+ DistributedSystem.Disconnect();
+ }
system = DistributedSystem.Connect(distributedSystemName, gemfirePropertes);
-
log.Info("Connected to Distributed System [" + system.Name + "]");
+
// first look for open caches
String msg = null;

0 comments on commit 4921629

Please sign in to comment.