| 1494 | } |
| 1495 | |
| 1496 | void TestStressWait() { |
| 1497 | #ifdef ARROW_VALGRIND |
| 1498 | const int N = 20; |
| 1499 | #else |
| 1500 | const int N = 2000; |
| 1501 | #endif |
| 1502 | MakeExecutor(N); |
| 1503 | const auto& futures = executor_->futures(); |
| 1504 | const auto spans = RandomSequenceSpans(N); |
| 1505 | for (const auto& span : spans) { |
| 1506 | int start = span.first, stop = span.second; |
| 1507 | executor_->SetFinishedDeferred(start, stop); |
| 1508 | AssertSpanSuccessful(start, stop); |
| 1509 | if (stop < N) { |
| 1510 | AssertNotFinished(futures[stop]); |
| 1511 | } |
| 1512 | } |
| 1513 | AssertAllSuccessful(); |
| 1514 | } |
| 1515 | |
| 1516 | protected: |
| 1517 | std::unique_ptr<ExecutorType> executor_; |
no test coverage detected