mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-20 04:35:32 +00:00
make sure that if we have a replicator to wait for then we hold on to it in case it gets nulled out in between
This commit is contained in:
+7
-4
@@ -179,10 +179,13 @@ public abstract class AbstractServerReplicationTestSetUp<ReplicableInterface ext
|
||||
* original exception propagate */
|
||||
logger.log(Level.SEVERE, "Exception trying to connect to initial load test servlet to STOP it", ex);
|
||||
}
|
||||
synchronized (replicaReplicator.getReplicator()) {
|
||||
while (!replicaReplicator.getReplicator().isQueueEmptyOrStopped()) {
|
||||
logger.info("Waiting for replication queue to drain...");
|
||||
replicaReplicator.getReplicator().wait();
|
||||
ReplicationReceiver replicaReplicatorReplicator = replicaReplicator.getReplicator();
|
||||
if (replicaReplicatorReplicator != null) {
|
||||
synchronized (replicaReplicatorReplicator) {
|
||||
while (!replicaReplicatorReplicator.isQueueEmptyOrStopped()) {
|
||||
logger.info("Waiting for replication queue to drain...");
|
||||
replicaReplicatorReplicator.wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.info("Replication queue has been drained...");
|
||||
|
||||
Reference in New Issue
Block a user