Skip to content

Commit

Permalink
passing min_followers and max_lag replication specs
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 committed May 20, 2024
1 parent faf8fa3 commit 5c625f4
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions spec/replication_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,16 @@ describe LavinMQ::Replication::Server do
when done.receive
fail "Should not receive message"
when timeout(0.1.seconds)
#ugly hack to release replicator from waiting for lag
repli = LavinMQ::Replication::Client.new(data_dir)
done = Channel(Nil).new
spawn do
repli.follow("127.0.0.1", LavinMQ::Config.instance.replication_port)
done.send nil
end
done.receive
client.try &.close(no_wait: true)
# Ugly hack to free us
# repli = LavinMQ::Replication::Client.new(data_dir)
# done = Channel(Nil).new
# spawn do
# repli.follow("127.0.0.1", LavinMQ::Config.instance.replication_port)
# done.send nil
# end
# done.receive
repli.try &.close
end
end
end
Expand Down

0 comments on commit 5c625f4

Please sign in to comment.