MCPcopy Create free account
hub / github.com/apache/arrow / FailAt

Function FailAt

cpp/src/arrow/testing/async_test_util.h:36–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35template <typename T>
36AsyncGenerator<T> FailAt(AsyncGenerator<T> src, int failing_index) {
37 auto index = std::make_shared<std::atomic<int>>(0);
38 return [src, index, failing_index]() {
39 auto idx = index->fetch_add(1);
40 if (idx >= failing_index) {
41 return Future<T>::MakeFinished(Status::Invalid("XYZ"));
42 }
43 return src();
44 };
45}
46
47template <typename T>
48AsyncGenerator<T> SlowdownABit(AsyncGenerator<T> source) {

Callers 2

TESTFunction · 0.85
TEST_PFunction · 0.85

Calls 1

InvalidFunction · 0.50

Tested by

no test coverage detected