-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reliability tests regex statements #5782
Conversation
ba4ead5
to
deb803c
Compare
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.
This change looks good to me. However, there is one test (test_cluster_connection.py
) that will fail sporadically if we don't change it.
I think we should use keep alive messages to validate the nodes connections instead of the first connection message, which can be trimmed from the logs if there are too many messages.
After implementing the changes suggested by @GGP1, the test passed without any errors: python3 -m pytest ./test_cluster --artifacts_path /Users/framos/Downloads/artifacts --html=report.html
=========================================================================== test session starts ============================================================================
platform darwin -- Python 3.9.6, pytest-7.1.2, pluggy-0.13.1
rootdir: /Users/framos/Documents/Wazuh/Repositories/wazuh-qa/tests, configfile: pytest.ini
plugins: testinfra-5.0.0, html-3.1.1, metadata-2.0.4
collected 6 items
test_cluster/test_cluster_logs/test_cluster_connection/test_cluster_connection.py . [ 16%]
test_cluster/test_cluster_logs/test_cluster_error_logs/test_cluster_error_logs.py . [ 33%]
test_cluster/test_cluster_logs/test_cluster_master_logs_order/test_cluster_master_logs_order.py . [ 50%]
test_cluster/test_cluster_logs/test_cluster_sync/test_cluster_sync.py . [ 66%]
test_cluster/test_cluster_logs/test_cluster_task_order/test_cluster_task_order.py . [ 83%]
test_cluster/test_cluster_logs/test_cluster_worker_logs_order/test_cluster_worker_logs_order.py . [100%]
------------------------------ generated html file: file:///Users/framos/Documents/Wazuh/Repositories/wazuh-qa/tests/reliability/report.html -------------------------------
============================================================================ 6 passed in 28.85s ============================================================================ |
test_cluster_sync.py
regex statements74a0c1d
to
f7bb900
Compare
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.
The issue release is 4.10.1
but the PR points to master, the branch corresponding to the target release version does not exist yet (it does exist in wazuh/wazuh), so we should wait until it is created to proceed.
This is to avoid the scenario in which the branch is created before the PR is merged and the change is not applied.
f7bb900
to
a232495
Compare
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.
LGTM
Description
Fix
test_cluster_sync.py
regex statements related to logs.