diff --git a/fabric/fabric-groups/src/test/java/io/fabric8/groups/GroupTest.java b/fabric/fabric-groups/src/test/java/io/fabric8/groups/GroupTest.java
index ade588e..3af3aed 100644
--- a/fabric/fabric-groups/src/test/java/io/fabric8/groups/GroupTest.java
+++ b/fabric/fabric-groups/src/test/java/io/fabric8/groups/GroupTest.java
@@ -27,11 +27,18 @@ import io.fabric8.groups.internal.ZooKeeperGroup;
 import org.junit.Test;
 
 import java.io.File;
+import java.io.IOException;
 import java.net.ServerSocket;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Deque;
 import java.util.List;
+import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.LinkedBlockingDeque;
 import java.util.concurrent.TimeUnit;
 
 import static org.junit.Assert.assertFalse;
@@ -49,7 +56,7 @@ public class GroupTest {
                 Collection<NodeState> members = group.members().values();
                 System.err.println("GroupEvent: " + event + " (connected=" + connected + ", master=" + master + ", members=" + members + ")");
             } else {
-                System.err.println("GroupEvent: " + event + " (connected=" + connected + ", master=false)");
+                System.err.println("GroupEvent: " + event + " (connected=" + connected + ", master=" +master + ")");
             }
         }
     };
@@ -132,6 +139,8 @@ public class GroupTest {
 
     }
 
+
+
     @Test
     public void testJoinAfterConnect() throws Exception {
         int port = findFreePort();
diff --git a/mq/mq-fabric/pom.xml b/mq/mq-fabric/pom.xml
index a695c35..569ba08 100644
--- a/mq/mq-fabric/pom.xml
+++ b/mq/mq-fabric/pom.xml
@@ -141,6 +141,14 @@
             <artifactId>slf4j-log4j12</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>activemq-broker</artifactId>
+            <version>${activemq-version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
 
     </dependencies>
 
diff --git a/mq/mq-fabric/src/test/java/io/fabric8/mq/fabric/ServiceFactoryTest.java b/mq/mq-fabric/src/test/java/io/fabric8/mq/fabric/ServiceFactoryTest.java
index 04f0cdf..8017756 100644
--- a/mq/mq-fabric/src/test/java/io/fabric8/mq/fabric/ServiceFactoryTest.java
+++ b/mq/mq-fabric/src/test/java/io/fabric8/mq/fabric/ServiceFactoryTest.java
@@ -17,20 +17,33 @@ package io.fabric8.mq.fabric;
 
 import java.io.File;
 import java.io.IOException;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
 import java.util.Properties;
 import java.util.Random;
+import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.LinkedBlockingDeque;
 import java.util.concurrent.TimeUnit;
 import javax.jms.JMSException;
+
+import io.fabric8.groups.Group;
+import io.fabric8.groups.GroupListener;
+import io.fabric8.groups.NodeState;
+import io.fabric8.groups.internal.ZooKeeperGroup;
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.util.SocketProxy;
 import org.apache.activemq.transport.TransportListener;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
 import org.apache.curator.retry.RetryNTimes;
+import org.apache.zookeeper.server.NIOServerCnxnFactory;
 import org.apache.zookeeper.server.ServerCnxnFactory;
 import org.apache.zookeeper.server.ZooKeeperServer;
 import org.junit.After;
@@ -52,6 +65,7 @@ public class ServiceFactoryTest {
     ActiveMQServiceFactory underTest;
     Random random = new Random();
     ZooKeeperServer server;
+    int zkPort;
 
     @Before
     public void infraUp() throws Exception {
@@ -61,7 +75,7 @@ public class ServiceFactoryTest {
 
         server = new ZooKeeperServer(dir, dir, tickTime);
         standaloneServerFactory = createFactory(0, numConnections);
-        int zkPort = standaloneServerFactory.getLocalPort();
+        zkPort = standaloneServerFactory.getLocalPort();
 
         System.setProperty("zookeeper.url","localhost:"+zkPort);
         standaloneServerFactory.startup(server);
@@ -334,6 +348,125 @@ public class ServiceFactoryTest {
         }
     }
 
+
+    @Test
+    public void testThreadsOnTimeout() throws Exception {
+
+        SocketProxy socketProxy = new SocketProxy(new URI("tcp://localhost:" + zkPort));
+        final CuratorFramework proxyCurator = CuratorFrameworkFactory.builder()
+                .connectString("localhost:" + socketProxy.getUrl().getPort())
+                .retryPolicy(new RetryNTimes(10, 100))
+                .build();
+        proxyCurator.start();
+
+
+        proxyCurator.getZookeeperClient().blockUntilConnectedOrTimedOut();
+
+
+        final String path = "/singletons/test/threads" + System.currentTimeMillis() + "**";
+        final ArrayList<Runnable> members = new ArrayList<Runnable>();
+        final int nThreads = 4;
+
+        class GroupRunnable implements Runnable, GroupListener<NodeState> {
+            final int id;
+            final private BlockingQueue<Integer> jobQueue = new LinkedBlockingDeque<Integer>();
+
+            ZooKeeperGroup<NodeState> group;
+            NodeState nodeState;
+
+            public GroupRunnable(int id) {
+                this.id = id;
+                members.add(this);
+                nodeState = new NodeState("foo" + id);
+            }
+
+            @Override
+            public void run() {
+                group = new ZooKeeperGroup<NodeState>(proxyCurator, path, NodeState.class);
+                group.add(this);
+
+                try {
+                    while (true) {
+                        switch (jobQueue.take()) {
+                            case 0:
+                                try {
+                                    group.close();
+                                } catch (IOException ignored) {
+                                }
+                                return;
+                            case 1:
+                                group.start();
+                                group.update(nodeState);
+                                break;
+                            case 2:
+                                nodeState.setId(nodeState.getId() + id);
+                                group.update(nodeState);
+                                break;
+
+                        }
+                    }
+                } catch (InterruptedException exit) {
+                }
+            }
+
+            @Override
+            public void groupEvent(Group<NodeState> group, GroupEvent event) {
+
+            }
+        };
+
+        ExecutorService executorService = Executors.newFixedThreadPool(nThreads);
+        for (int i=0;i<nThreads;i++) {
+            executorService.execute(new GroupRunnable(i));
+        }
+
+        for (Runnable r : members) {
+            GroupRunnable groupRunnable = (GroupRunnable) r;
+            groupRunnable.jobQueue.offer(1);
+
+            // wait for registration
+            while (groupRunnable.group == null || groupRunnable.group.getId() == null) {
+                TimeUnit.MILLISECONDS.sleep(100);
+            }
+        }
+
+        boolean firsStartedIsMaster = ((GroupRunnable) members.get(0)).group.isMaster();
+
+        assertTrue("first started is master", firsStartedIsMaster);
+
+        // lets see how long they take to notice a no responses to heart beats
+        socketProxy.pause();
+
+        // splash in an update
+        for (Runnable r : members) {
+            GroupRunnable groupRunnable = (GroupRunnable) r;
+            groupRunnable.jobQueue.offer(2);
+        }
+
+        boolean hasMaster = true;
+        while (hasMaster) {
+            for (Runnable r : members) {
+                GroupRunnable groupRunnable = (GroupRunnable) r;
+                hasMaster &= groupRunnable.group.isMaster();
+            }
+            if (hasMaster) {
+                LOG.info("Waiting for no master state on proxy pause");
+                TimeUnit.SECONDS.sleep(1);
+            }
+        }
+
+
+        for (Runnable r : members) {
+            GroupRunnable groupRunnable = (GroupRunnable) r;
+            groupRunnable.jobQueue.offer(0);
+        }
+
+        executorService.shutdownNow();
+        proxyCurator.close();
+        socketProxy.close();
+
+    }
+
     private void waitForClientsToConnect(BrokerService broker, int clientCount) throws Exception {
         for(int i=0;i<10;i++){
             if(broker.getBroker().getClients().length < clientCount)
