| 179 | } |
| 180 | |
| 181 | void TestFixedThreadName(IThreadPool& pool, const TString& expectedName) { |
| 182 | pool.Start(1); |
| 183 | TString name; |
| 184 | pool.SafeAddFunc([&name]() { |
| 185 | name = TThread::CurrentThreadName(); |
| 186 | }); |
| 187 | pool.Stop(); |
| 188 | if (TThread::CanGetCurrentThreadName()) { |
| 189 | UNIT_ASSERT_EQUAL(name, expectedName); |
| 190 | UNIT_ASSERT_UNEQUAL(TThread::CurrentThreadName(), expectedName); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | Y_UNIT_TEST(TestFixedThreadName) { |
| 195 | const TString expectedName = "HelloWorld"; |
no test coverage detected