Skip to content

Commit

Permalink
Fixing the tests post-rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwebber authored and Mark Needham committed Aug 12, 2016
1 parent ffb3048 commit 363cd98
Show file tree
Hide file tree
Showing 4 changed files with 968 additions and 76 deletions.
Expand Up @@ -37,6 +37,7 @@
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.stream.Collectors;

import org.neo4j.coreedge.core.CoreEdgeClusterSettings;
Expand Down Expand Up @@ -73,13 +74,15 @@ private static class GetConnectedClients implements Callable<Collection<String>>
{
private transient HazelcastInstance instance;

@Override
public Collection<String> call() throws Exception
{
final ClientService clientService = instance.getClientService();
final Collection<Client> connectedClients = clientService.getConnectedClients();
return connectedClients.stream().map( Client::getUuid ).collect( Collectors.toCollection( HashSet::new ) );
}

@Override
public void setHazelcastInstance( HazelcastInstance hazelcastInstance )
{
instance = hazelcastInstance;
Expand All @@ -98,7 +101,10 @@ private static Set<EdgeAddresses> edgeMembers( HazelcastInstance hazelcastInstan
final IExecutorService executorService = hazelcastInstance.getExecutorService( "default" );
try
{
connectedUUIDs = executorService.submit( new GetConnectedClients() ).get();
GetConnectedClients getConnectedClients = new GetConnectedClients();
getConnectedClients.setHazelcastInstance( hazelcastInstance );
Future<Collection<String>> collectionFuture = executorService.submit( getConnectedClients );
connectedUUIDs = collectionFuture.get();
}
catch ( InterruptedException | ExecutionException e )
{
Expand Down

0 comments on commit 363cd98

Please sign in to comment.