| 101 | } |
| 102 | |
| 103 | TEST_CLASS(LoggingCrashTests) |
| 104 | { |
| 105 | public: |
| 106 | TEST_METHOD(ChannelTryFlushForTimesOutWhenWorkerBlocked) |
| 107 | { |
| 108 | auto pChannel = std::make_shared<Channel>(); |
| 109 | auto pDriver = std::make_shared<BlockingDriver_>(); |
| 110 | pChannel->AttachComponent(pDriver, "drv:block"); |
| 111 | |
| 112 | pChannel->Submit(MakeEntry_()); |
| 113 | pDriver->entered.acquire(); |
| 114 | |
| 115 | const auto timedOut = pChannel->TryFlushFor(10ms); |
| 116 | Assert::IsFalse(timedOut); |
| 117 | |
| 118 | pDriver->release.release(); |
| 119 | const auto flushed = pChannel->TryFlushFor(500ms); |
| 120 | Assert::IsTrue(flushed); |
| 121 | } |
| 122 | |
| 123 | TEST_METHOD(CrashFlushUsesConfiguredTimeout) |
| 124 | { |
nothing calls this directly
no test coverage detected