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
This commit is contained in:
Mislav Bradac 2017-02-28 19:45:12 +01:00
parent 082465ff15
commit b5274cd139

View File

@ -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