Fix three python tests.#6328
Conversation
Two new tests in test_delta_input_catchup pause the input connector to modify and process the input table in lock step. It didn't pause the connector before the first iteration, introducing a race. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
The semantics of transmitted_records field in output connector metrics has recently changed to not reset to 0 on view and connecto changes. Update the test accordingly. Signed-off-by: Leonid Ryzhyk <ryzhyk@gmail.com>
mythical-fred
left a comment
There was a problem hiding this comment.
LGTM. Two clean test-only fixes.
test_delta_input_catchup: removes the pause_before_first_round flag and always pauses the connector before each round (including the first). This closes the race where the connector could begin polling the new commits before the test asserted the pre-round counter values \u2014 simpler and strictly more deterministic than the previous conditional.
test_silent_bootstrap_enterprise: updates expected transmitted_records from 0/1 (delta) to monotonically accumulated totals, matching the recent semantics change where output connector metrics are no longer reset on view/connector changes. The new 2 * expected_processed_records math for the post-non-silent-bootstrap restart is correct (every accumulated record gets retransmitted once on the non-silent restart). Inline comments are a nice touch.
Fix three test failures caused by bugs in test code (see commits).