removed tests with unused scenario that slowdown CI (#1820)

This commit is contained in:
Seraphima Zykova 2020-04-01 13:12:29 +03:00 committed by GitHub
parent bef8c846f8
commit a6b7ba41ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,88 +46,6 @@ namespace FancyZonesUnitTests
auto actual = MakeFancyZones(m_hInst, nullptr); auto actual = MakeFancyZones(m_hInst, nullptr);
Assert::IsNull(actual.get()); Assert::IsNull(actual.get());
} }
TEST_METHOD (Run)
{
auto actual = MakeFancyZones(m_hInst, m_settings);
std::vector<std::thread> threads;
std::atomic<int> counter = 0;
const int expectedCount = 10;
auto runFunc = [&]() {
actual->Run();
counter++;
};
for (int i = 0; i < expectedCount; i++)
{
threads.push_back(std::thread(runFunc));
}
for (auto& thread : threads)
{
thread.join();
}
Assert::AreEqual(expectedCount, counter.load());
}
TEST_METHOD (Destroy)
{
auto actual = MakeFancyZones(m_hInst, m_settings);
std::vector<std::thread> threads;
std::atomic<int> counter = 0;
const int expectedCount = 10;
auto destroyFunc = [&]() {
actual->Destroy();
counter++;
};
for (int i = 0; i < expectedCount; i++)
{
threads.push_back(std::thread(destroyFunc));
}
for (auto& thread : threads)
{
thread.join();
}
Assert::AreEqual(expectedCount, counter.load());
}
/*
TEST_METHOD(RunDestroy)
{
auto actual = MakeFancyZones(m_hInst, m_settings);
std::vector<std::thread> threads;
std::atomic<int> counter = 0;
const int expectedCount = 20;
auto func = [&]() {
auto idHash = std::hash<std::thread::id>()(std::this_thread::get_id());
bool run = (idHash % 2 == 0);
run ? actual->Run() : actual->Destroy();
counter++;
};
for (int i = 0; i < expectedCount; i++)
{
threads.push_back(std::thread(func));
}
for (auto& thread : threads)
{
thread.join();
}
Assert::AreEqual(expectedCount, counter.load());
}
*/
}; };
TEST_CLASS (FancyZonesIZoneWindowHostUnitTests) TEST_CLASS (FancyZonesIZoneWindowHostUnitTests)