| 625 | }; |
| 626 | |
| 627 | static void DoIoSleep(TCont* cont, void* argPtr) noexcept { |
| 628 | try { |
| 629 | TState& state = *(TState*) (argPtr); |
| 630 | state.IoSleepRunning = true; |
| 631 | |
| 632 | TTempBuf tmp; |
| 633 | // Wait for the event from io |
| 634 | auto res = NCoro::ReadD(cont, state.In.GetHandle(), tmp.Data(), 1, TDuration::Seconds(10).ToDeadLine()); |
| 635 | UNIT_ASSERT_VALUES_EQUAL(res.Checked(), 0); |
| 636 | state.IoSleepRunning = false; |
| 637 | } catch (const NUnitTest::TAssertException& ex) { |
| 638 | Cerr << ex.AsStrBuf() << Endl; |
| 639 | ex.BackTrace()->PrintTo(Cerr); |
| 640 | throw; |
| 641 | } catch (...) { |
| 642 | Cerr << CurrentExceptionMessage() << Endl; |
| 643 | throw; |
| 644 | } |
| 645 | } |
| 646 | |
| 647 | static void DoSub(TCont* cont, void* argPtr) noexcept { |
| 648 | TSubState& state = *(TSubState*)(argPtr); |
nothing calls this directly
no test coverage detected