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

Remove integrity_sync data in stable phase #2999

Merged
merged 2 commits into from
Jul 1, 2022

Conversation

Selutario
Copy link
Contributor

Related issue
Closes #2814

Description

This PR fixes the problem reported at #2814.

The problem occurs because the setup and stable phases are calculated using only the data of the master node (since that is the only node whose performance is seriously affected during setup). However, sometimes workers can display a last Integrity_sync log dated after the end of the setup phase on the master, causing the failure.

Integrity sync data in a worker after the setup phase is now discarded, so the error no longer occurs.

Logs example

$ python3 -m pytest performance/test_cluster/test_cluster_performance/test_cluster_performance.py --artifacts_path=/home/selu/Descargas/cluster_performance/fix_performance/artifacts --n_agents=50000 --n_workers=10 -vv

========================================================================= test session starts ==========================================================================
platform linux -- Python 3.8.10, pytest-5.0.0, py-1.8.2, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
metadata: {'Python': '3.8.10', 'Platform': 'Linux-5.4.0-117-generic-x86_64-with-glibc2.29', 'Packages': {'pytest': '5.0.0', 'py': '1.8.2', 'pluggy': '0.13.1'}, 'Plugins': {'metadata': '1.10.0', 'html': '3.1.1', 'testinfra': '5.0.0', 'tavern': '1.2.2', 'pep8': '1.0.6', 'cov': '2.10.0', 'asyncio': '0.14.0'}}
rootdir: /home/selu/Git/wazuh-qa/tests
plugins: metadata-1.10.0, html-3.1.1, testinfra-5.0.0, tavern-1.2.2, pep8-1.0.6, cov-2.10.0, asyncio-0.14.0
collected 1 item                                                                                                                                                       

performance/test_cluster/test_cluster_performance/test_cluster_performance.py::test_cluster_performance PASSED                                                   [100%]

======================================================================= 1 passed in 0.50 seconds =======================================================================

Tests

  • Proven that tests pass when they have to pass.
  • Proven that tests fail when they have to fail.
  • Python codebase satisfies PEP-8 style style guide. pycodestyle --max-line-length=120 --show-source --show-pep8 file.py.
  • Python codebase is documented following the Google Style for Python docstrings.
  • The test is documented in wazuh-qa/docs.
  • provision_documentation.sh generate the docs without errors.

@Selutario Selutario self-assigned this Jun 14, 2022
AdriiiPRodri
AdriiiPRodri previously approved these changes Jun 28, 2022
@Selutario Selutario force-pushed the fix/2814-cluster-performance-test branch from c446b6a to 3afd3a5 Compare July 1, 2022 07:23
@jmv74211 jmv74211 merged commit c9ef57a into master Jul 1, 2022
@jmv74211 jmv74211 deleted the fix/2814-cluster-performance-test branch July 1, 2022 07:31
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.

Error detected in test_cluster_performance
4 participants