chore(tests): remove dead code and hardcoded sleeps#2900
Conversation
|
@p-targowicz, start a full integration test pipeline with:
my commands and optionsYou can prevent me from automatically starting CI pipelines:
You can trigger a client pipeline on multiple prs with:
You can trigger a client pipeline for a specific Mender Client release with:
You can trigger GitHub->GitLab branch sync with:
You can print PR statistics for a repository with:
You can cherry pick to a given branch or branches with:
|
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2536252553 Build Configuration Matrix
|
5301a8b to
f4fc250
Compare
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2536354903 Build Configuration Matrix
|
94ab95e to
c27ba83
Compare
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2537195101 Build Configuration Matrix
|
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2537196703 Build Configuration Matrix
|
c27ba83 to
c6a426a
Compare
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2538446691 Build Configuration Matrix
|
c6a426a to
e231fb0
Compare
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2538886406 Build Configuration Matrix
|
8bfe6db to
5048872
Compare
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2539937154 Build Configuration Matrix
|
5048872 to
9fc9e6a
Compare
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2544594882 Build Configuration Matrix
|
9fc9e6a to
a0c45f2
Compare
|
Hello 😺 I created a pipeline for you here: Pipeline-2550881136 Build Configuration Matrix
|
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2550970314 Build Configuration Matrix
|
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2551098384 Build Configuration Matrix
|
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2551448563 Build Configuration Matrix
|
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2551510907 Build Configuration Matrix
|
|
@p-targowicz I think some merge commits slipped into this PR together with "normal" commits. |
47a82fd to
890f1ac
Compare
done @elkoniu |
danielskinstad
left a comment
There was a problem hiding this comment.
Hey, I haven't looked closely at the actual changes, but my immediate thought is that this should be split into multiple commits. Could you do that and ping me when it's ready to review?
890f1ac to
fd6d24a
Compare
Ticket: QA-1616 Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
Ticket: QA-1616 Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
Remove the console handler from setup_test_logger so DEBUG output no longer appears in the GitLab trace or pytest-html "Captured Stderr". All logs still go to mender_test_logs/<test>.log at DEBUG level. Add log_level = WARNING to pytest.ini to suppress pytest's own "Captured Log" section in the HTML report. Move _debug_log_containers_logs() call to conftest exception hook so container logs are captured on failure even when teardown is skipped. Changelog: None Ticket: QA-1616 Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
…ersions websockets removed InvalidStatusCode in favour of InvalidHandshake. Changelog: None Ticket: QA-1616 Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
… tests Switch iptables DROP to REJECT in test_in_poor_network_environment so mender-connect detects the disconnect immediately rather than waiting for TCP RTO (~60s). Replace the 128s sleep pairs with wait_for_connect (attempts=30, ~150s max) to accommodate exponential backoff after repeated failures. Add an attempts parameter to wait_for_connect (default 12) and set sleepscale=1 so the interval stays fixed at 5s instead of growing. Add a retry loop for startShell() in the reconnect test because the WebSocket reconnects before the shell service is fully ready. Remove the redundant 4s sleep before wait_for_connect in set_limits(). Changelog: None Ticket: QA-1616 Ticket: QA-1638 Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
Remove do_test_ok_preauth_and_remove and do_test_fail_preauth_existing from test_preauth.py along with their callers. Remove the dead outer tempfile block in test_mtls_enterprise_hsm that shadowed the inner block without being used. Replace list(set([device["id"] for device in ...])) with a plain list comprehension or direct get_devices_status() call. Device IDs are already unique so the set() conversion was unnecessary and silently changed the element type from dict to str. Replace fixed-time sleeps with redo.retrier polling loops in test_configuration.py, test_inventory.py, test_preauth.py, and test_monitor_client.py. Add poll_for_alert_state() helper to TestMonitorClientEnterprise to replace the pattern of sleep + immediate assert. Ticket: QA-1616 Ticket: QA-1638 Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
fd6d24a to
1cd9e24
Compare
|
@danielskinstad done, splitted into commits |
|
@mender-test-bot start integration pipeline |
|
Hello 😺 I created a pipeline for you here: Pipeline-2558259703 Build Configuration Matrix
|
danielskinstad
left a comment
There was a problem hiding this comment.
Looks mostly good from what I can see. I think there's more to remove, though. This one I linked in the ticket: https://github.com/mendersoftware/integration/tree/master/extra/legacy-clients-testing, but there is probably more in the extra/ dir that can be cleaned up
| docker_env.device.run("apt-get install -y iptables") | ||
| docker_env.device.run( | ||
| "iptables -A OUTPUT -j DROP --destination docker.mender.io" | ||
| "iptables -A OUTPUT -j REJECT --destination docker.mender.io" |
There was a problem hiding this comment.
I will let Peter comment on this test, as there is a ticket in progress for it
extra/travis-testing/(Travis CI legacy, repo uses GitLab CI)time.sleep()calls intest_mender_connect.pyandtest_filetransfer.pythat wait for mender-connect reconnection withwait_for_connect(), which polls the management API viaredo.retriertest_in_poor_network_environmentQA-1616, QA-1638