MCPcopy Create free account
hub / github.com/catboost/catboost / Y_UNIT_TEST

Function Y_UNIT_TEST

util/system/event_ut.cpp:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79
80Y_UNIT_TEST_SUITE(EventTest) {
81 Y_UNIT_TEST(WaitAndSignalTest) {
82 TSharedData data;
83 TThreadPool queue;
84 queue.Start(5);
85 for (size_t i = 0; i < 5; ++i) {
86 UNIT_ASSERT(queue.Add(new TThreadTask(data, i)));
87 }
88 queue.Stop();
89 UNIT_ASSERT(data.Counter.load() == 10);
90 UNIT_ASSERT(!data.failed);
91 }
92
93 Y_UNIT_TEST(ConcurrentSignalAndWaitTest) {
94 // test for problem detected by thread-sanitizer (signal/wait race) SEARCH-2113

Callers

nothing calls this directly

Calls 10

SecondsFunction · 0.70
moveFunction · 0.50
StartMethod · 0.45
AddMethod · 0.45
StopMethod · 0.45
loadMethod · 0.45
emplace_backMethod · 0.45
GetMethod · 0.45
backMethod · 0.45
WaitTMethod · 0.45

Tested by

no test coverage detected