stewart@stripped writes:
> +change master to master_bind='1.1.1.1';
> +connection master;
> +insert into t1 values (3);
> +save_master_pos;
> +connection slave;
> +start slave;
> +--real_sleep 1 # wait for I/O thread to try connection
It is almost always wrong to use sleep in test cases (because of race
conditions). But in this case I think it will work. Since, the race is that if
the connection _does not_ fail (==bug), the test may or may not fail depending
on timing. If the code works, there is no race.
So should work, but please add a comment explaining this (ie. explain why the
race condition will not cause random failures if the feature is correctly
implemented).
- Kristian.