loop/sweepbatcher
Boris Nagaev a2cee86783
sweepbatcher/test: fix races in require.Eventually
The code inside require.Eventually runs in parallel with the event loops
of the batcher and its batches. Accessing fields of the batcher and batches
must be done within an event loop.

To address this, testRunInEventLoop methods were added to the Batcher and batch
types. Unit tests were then rewritten to use this approach when accessing
batcher and batch fields.

Additionally, in many cases, receive operations from RegisterSpendChannel
were moved before require.Eventually. This prevents testRunInEventLoop from
getting stuck in an event loop while blocked on a RegisterSpendChannel send
operation.
2025-03-04 13:45:03 -03:00
..
greedy_batch_selection.go sweepbatcher: always enabled mixed batches 2025-02-05 15:16:57 -03:00
greedy_batch_selection_test.go sweepbatcher: always enabled mixed batches 2025-02-05 15:16:57 -03:00
log.go sweepbatcher: fix too long lines 2024-05-29 12:17:18 -03:00
store.go sweepbatcher/store: remove unused field clock 2024-08-13 09:20:31 -03:00
store_mock.go sweepbatcher: fix race in store_mock 2025-03-04 10:25:30 -03:00
sweep_batch.go sweepbatcher/test: fix races in require.Eventually 2025-03-04 13:45:03 -03:00
sweep_batcher.go sweepbatcher/test: fix races in require.Eventually 2025-03-04 13:45:03 -03:00
sweep_batcher_test.go sweepbatcher/test: fix races in require.Eventually 2025-03-04 13:45:03 -03:00