Skip to content
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

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

RamosFe
Copy link
Member

@RamosFe RamosFe commented Sep 30, 2024

Description

Fix test_cluster_sync.py regex statements related to logs.


@RamosFe RamosFe self-assigned this Sep 30, 2024
@RamosFe RamosFe force-pushed the bug/25942-reliability-test-fix branch from ba4ead5 to deb803c Compare September 30, 2024 12:54
@RamosFe RamosFe linked an issue Sep 30, 2024 that may be closed by this pull request
Copy link
Member

@GGP1 GGP1 left a 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.

@RamosFe
Copy link
Member Author

RamosFe commented Sep 30, 2024

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 ============================================================================

@RamosFe RamosFe changed the title Fix test_cluster_sync.py regex statements Fix reliability tests regex statements Sep 30, 2024
GGP1

This comment was marked as outdated.

@fdalmaup fdalmaup linked an issue Oct 2, 2024 that may be closed by this pull request
@RamosFe RamosFe force-pushed the bug/25942-reliability-test-fix branch from 74a0c1d to f7bb900 Compare October 2, 2024 15:20
@RamosFe RamosFe changed the base branch from 4.9.1 to master October 2, 2024 15:21
@GGP1 GGP1 self-requested a review October 2, 2024 16:13
Copy link
Member

@GGP1 GGP1 left a 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.

@fdalmaup fdalmaup force-pushed the bug/25942-reliability-test-fix branch from f7bb900 to a232495 Compare October 3, 2024 07:26
@fdalmaup fdalmaup changed the base branch from master to 4.10.0 October 3, 2024 07:27
Copy link
Member

@GGP1 GGP1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@juliamagan juliamagan merged commit 23d685e into 4.10.0 Oct 4, 2024
@juliamagan juliamagan deleted the bug/25942-reliability-test-fix branch October 4, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review and fix cluster reliability tests
4 participants