From b5274cd13979ed243bd80290fcf0bf457ebb48db Mon Sep 17 00:00:00 2001 From: Mislav Bradac Date: Tue, 28 Feb 2017 19:45:12 +0100 Subject: [PATCH] Reduce number of iterations in fswatcher test Summary: Trivial: iterations 10 -> 2. So that unit tests run for less time. Put flaky warking in test. Reviewers: buda Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D78 --- tests/unit/fswatcher.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/fswatcher.cpp b/tests/unit/fswatcher.cpp index bd75f37c6..151ed3514 100644 --- a/tests/unit/fswatcher.cpp +++ b/tests/unit/fswatcher.cpp @@ -11,6 +11,8 @@ using namespace std::chrono_literals; using namespace utils; +// TODO: This test is flaky, we should fix it sometime. + fs::path working_dir = "../data"; fs::path filename = "test.txt"; fs::path test_path = working_dir / filename; @@ -51,7 +53,7 @@ TEST(FSWatcherTest, CreateDeleteLoop) { FSWatcher watcher; // parameters - int iterations = 10; + int iterations = 2; int created_no = 0; int deleted_no = 0; @@ -94,7 +96,7 @@ TEST(FSWatcherTest, ModifiyLoop) { FSWatcher watcher; // parameters - int iterations = 10; + int iterations = 2; int modified_no = 0; // 3 is here because the test has to ensure that there is enough time