mirror of
https://github.com/transmission/transmission
synced 2025-01-31 11:23:40 +00:00
test: fix watchdir CI flake (#3839)
This commit is contained in:
parent
228efa16e3
commit
76fc42b659
1 changed files with 3 additions and 3 deletions
|
@ -234,17 +234,17 @@ TEST_P(WatchDirTest, retry)
|
||||||
};
|
};
|
||||||
auto watchdir = createWatchDir(path, callback);
|
auto watchdir = createWatchDir(path, callback);
|
||||||
auto constexpr FastRetryWaitTime = 20ms;
|
auto constexpr FastRetryWaitTime = 20ms;
|
||||||
auto constexpr ThreeRetries = FastRetryWaitTime * 4;
|
auto constexpr SlowRetryWaitTime = 200ms;
|
||||||
auto* const base_watchdir = dynamic_cast<impl::BaseWatchdir*>(watchdir.get());
|
auto* const base_watchdir = dynamic_cast<impl::BaseWatchdir*>(watchdir.get());
|
||||||
ASSERT_TRUE(base_watchdir != nullptr);
|
ASSERT_TRUE(base_watchdir != nullptr);
|
||||||
base_watchdir->setRetryDuration(FastRetryWaitTime);
|
base_watchdir->setRetryDuration(FastRetryWaitTime);
|
||||||
|
|
||||||
processEvents(ThreeRetries);
|
processEvents(SlowRetryWaitTime);
|
||||||
EXPECT_EQ(0U, std::size(names));
|
EXPECT_EQ(0U, std::size(names));
|
||||||
|
|
||||||
auto const test_file = "test.txt"sv;
|
auto const test_file = "test.txt"sv;
|
||||||
createFile(path, test_file);
|
createFile(path, test_file);
|
||||||
processEvents(ThreeRetries);
|
processEvents(SlowRetryWaitTime);
|
||||||
EXPECT_LE(2U, std::size(names));
|
EXPECT_LE(2U, std::size(names));
|
||||||
for (auto const& name : names)
|
for (auto const& name : names)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue