| 729 | } |
| 730 | |
| 731 | bool success() { |
| 732 | bool timedOut = now() - start > maxDDRunTime; |
| 733 | if (!failReasons.empty()) { |
| 734 | std::string traceMessage = fmt::format("QuietDatabase{}Fail", phase); |
| 735 | std::string reasons = fmt::format("{}", fmt::join(failReasons, ", ")); |
| 736 | TraceEvent(timedOut ? SevError : SevWarnAlways, traceMessage.c_str()) |
| 737 | .detail("Reasons", reasons) |
| 738 | .detail("FailedAfter", now() - start) |
| 739 | .detail("Timeout", maxDDRunTime); |
| 740 | if (timedOut) { |
| 741 | // this bool is just created to make the assertion more readable |
| 742 | bool ddGotStuck = true; |
| 743 | // This assertion is here to make the test fail more quickly. If quietDatabase takes this |
| 744 | // long without completing, we can assume that the test will eventually time out. However, |
| 745 | // time outs are more annoying to debug. This will hopefully be easier to track down. |
| 746 | ASSERT(!ddGotStuck || !g_network->isSimulated()); |
| 747 | } |
| 748 | return false; |
| 749 | } |
| 750 | return true; |
| 751 | } |
| 752 | }; |
| 753 | |
| 754 | Impl startIteration(std::string const& phase) const { |
no test coverage detected