Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Baoyi Chen committed Dec 9, 2023
1 parent e29de44 commit b6431fa
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ public void onEvent(Replicator replicator, Event event) {

if (event instanceof PostRdbSyncEvent) {
if (flag.compareAndSet(false, true)) {
// will trigger full sync at this time
r.getLogger().info("psync close 2");
close(replicator);
Thread thread = new Thread(new JRun());
thread.setDaemon(true);
Expand All @@ -111,15 +109,15 @@ public void onEvent(Replicator replicator, Event event) {
if (acc.get() == 500) {
//close current process port;
//that will auto trigger psync command
r.getLogger().info("psync close 3");
r.getLogger().info("psync close 2");
r.getLogger().info("id:{}, offset:{}", configuration.getReplId(), configuration.getReplOffset());
close(replicator);
}

if (acc.get() == 1010) {
//close current process port;
//that will auto trigger psync command
r.getLogger().info("psync close 4");
r.getLogger().info("psync close 3");
r.getLogger().info("id:{}, offset:{}", configuration.getReplId(), configuration.getReplOffset());
close(replicator);
}
Expand All @@ -136,7 +134,7 @@ public void onEvent(Replicator replicator, Event event) {
}
});
r.open();
assertEquals(3, acc1.get());
assertEquals(2, acc1.get());
assertEquals(1500, acc.get());
}

Expand Down

0 comments on commit b6431fa

Please sign in to comment.