summaryrefslogtreecommitdiff
path: root/tests/threads
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-04-03 23:07:16 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2017-04-03 23:14:24 +0100
commit7ece906598fff75ea0d0b73b7158c077e6654698 (patch)
treede76c7170cd5107921f8ed4edb6d60625e022ef1 /tests/threads
parent1069ad3c54c9aab24f5d5a3c0a84c0b8a599b251 (diff)
downloadlibgit2-7ece906598fff75ea0d0b73b7158c077e6654698.tar.gz
win32: make posix emulation retries configurable
POSIX emulation retries should be configurable so that tests can disable them. In particular, maniacally threading tests may end up trying to open locked files and need retries, which will slow continuous integration tests significantly.
Diffstat (limited to 'tests/threads')
-rw-r--r--tests/threads/diff.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/threads/diff.c b/tests/threads/diff.c
index c32811469..92fd7061b 100644
--- a/tests/threads/diff.c
+++ b/tests/threads/diff.c
@@ -19,12 +19,20 @@ static git_repository *_repo;
static git_tree *_a, *_b;
static git_atomic _counts[4];
static int _check_counts;
+static int _retries;
#define THREADS 20
+void test_threads_diff__initialize(void)
+{
+ _retries = git_win32__retries;
+ git_win32__retries = 1;
+}
+
void test_threads_diff__cleanup(void)
{
cl_git_sandbox_cleanup();
+ git_win32__retries = _retries;
}
static void setup_trees(void)