Context
This issue tracks the implementation of an async test variant for the exponential backoff logic in accept_loop.
Background
In PR #290 (making exponential backoff parameters configurable), the current test test_accept_exponential_backoff_doubles_and_caps only validates the timing behaviour synchronously. It doesn't exercise the actual accept_loop function with a mock listener that returns errors.
Requirements
Create an additional async test that:
- Simulates the
accept_loop with a mock listener that returns repeated errors
- Allows observation of the backoff and retry logic in an end-to-end asynchronous context
- Implements a mock listener struct with the necessary trait, making it return errors on accept calls
- Runs the
accept_loop in the test to assert the backoff behaviour asynchronously
References
Context
This issue tracks the implementation of an async test variant for the exponential backoff logic in
accept_loop.Background
In PR #290 (making exponential backoff parameters configurable), the current test
test_accept_exponential_backoff_doubles_and_capsonly validates the timing behaviour synchronously. It doesn't exercise the actualaccept_loopfunction with a mock listener that returns errors.Requirements
Create an additional async test that:
accept_loopwith a mock listener that returns repeated errorsaccept_loopin the test to assert the backoff behaviour asynchronouslyReferences