-
Notifications
You must be signed in to change notification settings - Fork 461
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test_runner: improve
wait_until
(#9936)
Improves `wait_until` by: * Use `timeout` instead of `iterations`. This allows changing the timeout/interval parameters independently. * Make `timeout` and `interval` optional (default 20s and 0.5s). Most callers don't care. * Only output status every 1s by default, and add optional `status_interval` parameter. * Remove `show_intermediate_error`, this was always emitted anyway. Most callers have been updated to use the defaults, except where they had good reason otherwise.
- Loading branch information
1 parent
45658cc
commit 5330122
Showing
46 changed files
with
234 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,14 +148,12 @@ def test_debezium(debezium): | |
) | ||
conn.commit() | ||
wait_until( | ||
100, | ||
0.5, | ||
lambda: get_kafka_msg( | ||
consumer, | ||
ts_ms, | ||
after={"first_name": "John", "last_name": "Dow", "email": "[email protected]"}, | ||
), | ||
show_intermediate_error=True, | ||
timeout=60, | ||
) | ||
ts_ms = time.time() * 1000 | ||
log.info("Insert 2 ts_ms: %s", ts_ms) | ||
|
@@ -165,28 +163,24 @@ def test_debezium(debezium): | |
) | ||
conn.commit() | ||
wait_until( | ||
100, | ||
0.5, | ||
lambda: get_kafka_msg( | ||
consumer, | ||
ts_ms, | ||
after={"first_name": "Alex", "last_name": "Row", "email": "[email protected]"}, | ||
), | ||
show_intermediate_error=True, | ||
timeout=60, | ||
) | ||
ts_ms = time.time() * 1000 | ||
log.info("Update ts_ms: %s", ts_ms) | ||
cur.execute("update inventory.customers set first_name = 'Alexander' where id = 2") | ||
conn.commit() | ||
wait_until( | ||
100, | ||
0.5, | ||
lambda: get_kafka_msg( | ||
consumer, | ||
ts_ms, | ||
after={"first_name": "Alexander"}, | ||
), | ||
show_intermediate_error=True, | ||
timeout=60, | ||
) | ||
time.sleep(3) | ||
cur.execute("select 1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5330122
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7144 tests run: 6825 passed, 1 failed, 318 skipped (full report)
Failures on Postgres 16
test_sharded_ingest[github-actions-selfhosted-vanilla-1]
: release-x86-64Flaky tests (2)
Postgres 15
test_prefetch[4]
: release-x86-64Postgres 14
test_prefetch[None]
: release-x86-64Code coverage* (full report)
functions
:30.4% (8272 of 27226 functions)
lines
:47.8% (65236 of 136512 lines)
* collected from Rust tests only
5330122 at 2024-12-02T12:50:41.591Z :recycle: