Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
libflux/test: Fix race in stat watcher test #2177
This PR fixes issue #997, test failure was due to race in test. The stat watcher test performs a append & unlink and wants the stat watcher to detect both changes. However, the append + unlink can occur in between polling loops of the stat watcher, thus the append can be missed. The solution was to add a state variable that would not unlink the file until the stat watcher noticed the file size change from the append.
This PR also reverts 7a319e3, which
Ran through travis several times before fix and hit the issue many times. After the fix, ran through travis 3 times and never hit the problem again.
Rename stattimer_ctx to stat_ctx and move some globals into it. Rename some enums appropriately for change.