mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-27 09:40:51 +01:00
408d5b12e8test: include response body in non-JSON HTTP error msg (Matthew Zipkin)9dc653b3b4test: threadpool, add coverage for all Submit() errors (furszy)ce2a984ee3test: cleanup, use HasReason in threadpool_tests.cpp (l0rinc)d9c6769d03test: refactor, decouple HasReason from test framework machinery (furszy)dbbb780af0test: move and simplify BOOST_CHECK ostream helpers (Hodlinator)3b7cbcafcbtest: ensure Stop() thread helps drain the queue (seduless)ca101a2315test: coverage for queued tasks completion after interrupt (furszy)bf2c607aaathreadpool: active-wait during shutdown (furszy)e88d274430test: add threadpool Start-Stop race coverage (furszy)8cd4a4363fthreadpool: guard against Start-Stop race (furszy)9ff1e82e7dtest: cleanup, block threads via semaphore instead of shared_future (l0rinc) Pull request description: A few follow-ups to #33689, includes: 1) `ThreadPool` active-wait during shutdown: Instead of just waiting for workers to finish processing tasks, `Stop()` now helps them actively. This speeds up the JSON-RPC and REST server shutdown, resulting in a faster node shutdown when many requests remain unhandled. This wasn't included in the original PR due to the behavior change this introduces. 2) Decouple `HasReason` from the unit test framework machinery This avoids providing the entire unit test framework dependency to low-level tests that only require access to the `HasReason` utility class. Examples are: `reverselock_tests.cpp`, `sync_tests.cpp`, `util_check_tests.cpp`, `util_string_tests.cpp`, `script_parse_tests.cpp` and `threadpool_tests.cpp`. These tests no longer gain access to unnecessary components like the chainstate, node context, caches, etc. It includes l0rinc's `threadpool_tests.cpp` `HasReason` changes. 3) Include response body in non-JSON HTTP error messages Straight from pinheadmz [comment](https://github.com/bitcoin/bitcoin/pull/33689#discussion_r2783817192), it makes debugging CI issues easier. ACKs for top commit: maflcko: review ACK408d5b12e8🕗 achow101: ACK408d5b12e8hodlinator: re-ACK408d5b12e8Tree-SHA512: 57aa0ef96886f32bf95a0bd7f87c878d31c9df9e34cb96de615eee703ce0824b5cfdf8f5c9cd19a3594559994295b5810c38c94f5efd6291cbbd83a95473357a