diff options
author | fanquake <fanquake@gmail.com> | 2023-03-23 14:55:40 +0000 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-03-23 15:09:50 +0000 |
commit | 483fb8d2165bacafe9c12a829afca248feeeb42f (patch) | |
tree | b6ea38080458766eb593ad17d54dee117c28c03b /src/fs.h | |
parent | 8acfb1f8e045677b04cf8c4aa790dc6b90d93fa1 (diff) | |
parent | fa0696e7863af03efbffa026c2060ff2b5720fb1 (diff) |
Merge bitcoin/bitcoin#27287: test: Replace threading with concurrent.futures
fa0696e7863af03efbffa026c2060ff2b5720fb1 test: Replace threading with concurrent.futures (MarcoFalke)
Pull request description:
`threading` has no easy way to get the return value or exception once the target function stops. Not checking the return value or exception can make tests more fragile and failures harder to debug.
Fix this by checking the return value (or exception) by wrapping the function execution into a future and calling `result()` on it.
Can be reviewed with `--ignore-all-space`.
(There are still some uses of `threading` around, because some tests do expect an exception to be thrown and caught in the target function)
ACKs for top commit:
ishaanam:
ACK fa0696e7863af03efbffa026c2060ff2b5720fb1
stickies-v:
ACK fa0696e7863af03efbffa026c2060ff2b5720fb1
Tree-SHA512: d9ddf6b3c530cd8c485a030a3c84d4e03d3e9f9ea8240b050afcd566a884f5cabe816ac56910cec9ea9fa299239e5abb99e672dda05a74974f61bb68dc3c1d65
Diffstat (limited to 'src/fs.h')
0 files changed, 0 insertions, 0 deletions