This test is a regression for ARROW-15604. OT has some static state that can be initialized after the CPU and I/O thread pools. We need to make sure OT's state persists for the lifetime of any threads in those thread pools. This test checks this by spawning a thread task that will outlive the unit test's lifetime and so teardown of static state should begin before this thread finishes.
| 38 | // test's lifetime and so teardown of static state should begin before this |
| 39 | // thread finishes. |
| 40 | TEST(Tracing, OtLifetime) { |
| 41 | ASSERT_OK(::arrow::internal::GetCpuThreadPool()->Spawn([] { |
| 42 | // This thread will outlive the main test thread. |
| 43 | Span span; |
| 44 | START_SPAN(span, "Test"); |
| 45 | SleepFor(0.1); |
| 46 | })); |
| 47 | } |
| 48 | |
| 49 | // This test checks that the Span valid invariant is maintained: |
| 50 | // 1. Span is invalid before START_SPAN |
nothing calls this directly
no test coverage detected