mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 08:17:37 +00:00
Merge pull request #4941
1cfd6f1
unit_tests: strengthen notify test against OS scheduling (moneromooo-monero)
This commit is contained in:
commit
4a78bcd275
1 changed files with 16 additions and 5 deletions
|
@ -69,11 +69,22 @@ TEST(notify, works)
|
||||||
tools::Notify notify(spec.c_str());
|
tools::Notify notify(spec.c_str());
|
||||||
notify.notify("1111111111111111111111111111111111111111111111111111111111111111");
|
notify.notify("1111111111111111111111111111111111111111111111111111111111111111");
|
||||||
|
|
||||||
|
bool ok = false;
|
||||||
|
for (int i = 0; i < 10; ++i)
|
||||||
|
{
|
||||||
epee::misc_utils::sleep_no_w(100);
|
epee::misc_utils::sleep_no_w(100);
|
||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
ASSERT_TRUE(epee::file_io_utils::load_file_to_string(name_template, s));
|
if (epee::file_io_utils::load_file_to_string(name_template, s))
|
||||||
ASSERT_TRUE(s == "1111111111111111111111111111111111111111111111111111111111111111");
|
{
|
||||||
|
if (s == "1111111111111111111111111111111111111111111111111111111111111111")
|
||||||
boost::filesystem::remove(name_template);
|
{
|
||||||
|
ok = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
std::cout << "got: [" << s << "]" << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boost::filesystem::remove(name_template);
|
||||||
|
ASSERT_TRUE(ok);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue