}
}
});
ZNRecord record2 = new ZNRecord(String.valueOf(System.currentTimeMillis()));
record2.putSimpleField(DistributedDeploymentManager.S4R_URI, uriConsumer);
zkClient.create("/s4/clusters/" + CONSUMER_CLUSTER + "/app/s4App", record2, CreateMode.PERSISTENT);
// TODO check that consumer app is ready with a better way than checking stream consumers
Assert.assertTrue(signalConsumerReady.await(20, TimeUnit.SECONDS));
ZNRecord record1 = new ZNRecord(String.valueOf(System.currentTimeMillis()));
record1.putSimpleField(DistributedDeploymentManager.S4R_URI, uriProducer);
zkClient.create("/s4/clusters/" + PRODUCER_CLUSTER + "/app/s4App", record1, CreateMode.PERSISTENT);
// that may be a bit long to complete...
Assert.assertTrue(signalConsumptionComplete.await(30, TimeUnit.SECONDS));