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

Function TEST_F

cpp/src/arrow/util/future_test.cc:1010–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008};
1009
1010TEST_F(FutureSchedulingTest, ScheduleNever) {
1011 CallbackOptions options;
1012 options.should_schedule = ShouldSchedule::Never;
1013 options.executor = executor();
1014 // Successful future
1015 {
1016 auto fut = Future<>::Make();
1017 fut.AddCallback(callback(1), options);
1018 fut.MarkFinished();
1019 fut.AddCallback(callback(2), options);
1020 ASSERT_EQ(0, spawn_count());
1021 AssertRunSynchronously({1, 2});
1022 }
1023 // Failing future
1024 {
1025 auto fut = Future<>::Make();
1026 fut.AddCallback(callback(3), options);
1027 fut.MarkFinished(Status::Invalid("XYZ"));
1028 fut.AddCallback(callback(4), options);
1029 ASSERT_EQ(0, spawn_count());
1030 AssertRunSynchronously({3, 4});
1031 }
1032}
1033
1034TEST_F(FutureSchedulingTest, ScheduleAlways) {
1035 CallbackOptions options;

Callers

nothing calls this directly

Calls 11

GetCpuThreadPoolFunction · 0.85
AllCompleteFunction · 0.85
ThenMethod · 0.80
storeMethod · 0.80
IsCurrentExecutorMethod · 0.80
MakeFunction · 0.70
executorFunction · 0.50
InvalidFunction · 0.50
AddCallbackMethod · 0.45
MarkFinishedMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected