fixed initial load serialization for replication tests

This commit is contained in:
Axel Uhl committed 2014-11-14 00:21:16 +01:00
1 parent a808d78d14
commit 29db1e0858
3 files changed
+5 -8

No files matched your search

@@ -497,12 +497,12 @@ public class ReplicationServiceImpl implements ReplicationService {
logger.info("Started replicator thread");
InputStream is = initialLoadURL.openStream();
final String queueName = new BufferedReader(new InputStreamReader(is)).readLine();
RabbitInputStreamProvider rabbitInputStreamProvider = new RabbitInputStreamProvider(master.createChannel(),
queueName);
RabbitInputStreamProvider rabbitInputStreamProvider = new RabbitInputStreamProvider(master.createChannel(), queueName);
try {
final GZIPInputStream gzipInputStream = new GZIPInputStream(rabbitInputStreamProvider.getInputStream());
for (Replicable<?, ?> replicable : getReplicables()) {
logger.info("Starting to receive initial load");
replicable.initiallyFillFrom(new GZIPInputStream(rabbitInputStreamProvider.getInputStream()));
replicable.initiallyFillFrom(gzipInputStream);
logger.info("Done receiving initial load");
replicator.setSuspended(false); // apply queued operations
}