Sentinel: new test unit 07 that tests master down conditions.
Sentinel: check Slave INFO state more often when disconnected.During the initial handshake with the master a slave will report to havea very high disconnection time from its master (since technica
Sentinel: check Slave INFO state more often when disconnected.During the initial handshake with the master a slave will report to havea very high disconnection time from its master (since technically it wasdisconnected since forever, so the current UNIX time in seconds isreported).However when the slave is connected again the Sentinel may re-scan theINFO output again only after 10 seconds, which is a long time. Duringthis time Sentinels will consider this instance unable to failover, soa useless delay is introduced.Actaully this hardly happened in the practice because when a slave'smaster is down, the INFO period for slaves changes to 1 second. Howeverwhen a manual failover is attempted immediately after adding slaves(like in the case of the Sentinel unit test), this problem may happen.This commit changes the INFO period to 1 second even in the case theslave's master is not down, but the slave reported to be disconnectedfrom the master (by publishing, last time we checked, a masterdisconnection time field in INFO).This change is required as a result of an unrelated change in thereplication code that adds a small delay in the master-slave firstsynchronization.
show more ...
Sentinel: CKQUORUM tests
Sentinel / Cluster test: exit with non-zero error code on failures.
Spell software correctly
Sentinel test: more correct sentinels config reset.In the initialization test for each instance we used to unregister theold master and register it again to clear the config.However there is a ra
Sentinel test: more correct sentinels config reset.In the initialization test for each instance we used to unregister theold master and register it again to clear the config.However there is a race condition doing this: as soon as we unregisterand re-register "mymaster", another Sentinel can update the newconfiguration with the old state because of gossip "hello" messages.So the correct procedure is instead, unregister "mymaster" from all thesentinel instances, and re-register it everywhere again.
Sentinel test: tolerate larger delays in init tests.
Sentinel test: unit 02, avoid some time related false positives.
Sentinel test: add manual failover test.
Add correct exit value to failed tests
Cluster / Sentinel test: instances count moved to run.tcl.
Sentinel test files / directories layout improved.The test now runs in a self-contained directory.The general abstractions to run the tests in an environment wheremutliple instances are executed
Sentinel test files / directories layout improved.The test now runs in a self-contained directory.The general abstractions to run the tests in an environment wheremutliple instances are executed at the same time was extrapolated intoinstances.tcl, that will be reused to test Redis Cluster.