mirror of
https://git.proxmox.com/git/libgit2
synced 2026-01-02 07:11:30 +00:00
tests: tick over five seconds instead of one
When ticking over one second, it can happen that the actual time ticks over the same second between the time that we undermine our own race protections and the time in which we perform the index update. Such timing would make the time in the entries match the index' timestamp and we have not gained anything. Ticking over five seconds makes it so that if real-time rolls over that second, our index is still ahead. This is still suboptimal as we're dealing with timing, but five seconds should be long enough for any reasonable test runner to finish the tests.
This commit is contained in:
parent
6e0470e0f5
commit
863dd89abf
@ -143,7 +143,7 @@ void tick_index(git_index *index)
|
||||
|
||||
times[0].tv_sec = ts;
|
||||
times[0].tv_usec = 0;
|
||||
times[1].tv_sec = ts + 1;
|
||||
times[1].tv_sec = ts + 5;
|
||||
times[1].tv_usec = 0;
|
||||
|
||||
cl_git_pass(p_utimes(git_index_path(index), times));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user