propagate.tcl 1.0 KB

123456789101112131415161718192021222324252627282930
  1. set testmodule [file normalize tests/modules/propagate.so]
  2. tags "modules" {
  3. test {Modules can propagate in async and threaded contexts} {
  4. start_server {} {
  5. set replica [srv 0 client]
  6. set replica_host [srv 0 host]
  7. set replica_port [srv 0 port]
  8. start_server [list overrides [list loadmodule "$testmodule"]] {
  9. set master [srv 0 client]
  10. set master_host [srv 0 host]
  11. set master_port [srv 0 port]
  12. # Start the replication process...
  13. $replica replicaof $master_host $master_port
  14. wait_for_sync $replica
  15. after 1000
  16. $master propagate-test
  17. wait_for_condition 5000 10 {
  18. ([$replica get timer] eq "10") && \
  19. ([$replica get thread] eq "10")
  20. } else {
  21. fail "The two counters don't match the expected value."
  22. }
  23. }
  24. }
  25. }
  26. }