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

Move the 'get_datetime_diff' function to 'wazuh-testing' utils module #2782

Merged
merged 2 commits into from
May 30, 2022

Conversation

yanazaeva
Copy link
Contributor

Related issue
#2287

Description

This closes #2287. The aim of this pull is to move the get_datetime_diff function from the cluster_performance_test into the wazuh_testing.utils module. After this change, the test continues to work as expected:

(wazuh_qa_env) yanazaeva@pop-os:~/git/wazuh-qa/deps/wazuh_testing$ python3.9 -m pytest  ../../tests/performance/test_cluster/test_cluster_performance/ --artifacts_path=/docs/rc5/50000A25W --n_workers=25 --n_agents=50000
=============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.9.5, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: /home/yanazaeva/git/wazuh-qa
plugins: testinfra-5.0.0, metadata-1.11.0, html-3.1.1
collected 1 item                                                                                                                                                                                                  

../../tests/performance/test_cluster/test_cluster_performance/test_cluster_performance.py .                                                                                                                 [100%]

================================================================================================ 1 passed in 0.50s ================================================================================================
Results
R1 🟢
R2 🟢
R3 🟢

Selutario
Selutario previously approved these changes Apr 12, 2022
@@ -53,7 +53,7 @@ resources:
workers:
max: 47.85
mean: 9.35
reg_cof: 0.06
reg_cof: 0.1
Copy link
Member

Choose a reason for hiding this comment

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

Why is this change needed in this PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

The current thresholds are too small and strict, which causes most tests to be considered failed. It will be necessary to increase them little by little so that they only fail if an environment really has unusually high resource consumption.

@Selutario Selutario force-pushed the feature/2287-move-get-datetime-diff-to-wazuh-testing branch from d6497d0 to c09339e Compare May 24, 2022 11:50
@Selutario
Copy link
Contributor

PR update

I fixed the conflicts. These are the results of test_cluster_performance.py when using this artifacts:

python3 -m pytest tests/performance/test_cluster/test_cluster_performance/ --artifacts_path='/home/selu/Descargas/cluster_performance/107' --html=report.html --self-contained-html --n_workers=25 --n_agents=50000
============================================================================================ test session starts ============================================================================================
platform linux -- Python 3.8.10, pytest-5.0.0, py-1.8.2, pluggy-0.13.1
rootdir: /home/selu/Git/wazuh-qa
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                                                                                                                                                                                            

tests/performance/test_cluster/test_cluster_performance/test_cluster_performance.py .                                                                                                                 [100%]

---------------------------------------------------------------------- generated html file: file:///home/selu/Git/wazuh-qa/report.html ----------------------------------------------------------------------
=================================================================================== 1 passed, 2 warnings in 0.81 seconds ====================================================================================

@Selutario Selutario requested a review from juliamagan May 24, 2022 11:59
@juliamagan
Copy link
Member

24/05/2022

Testing

We have used the artifacts attached here

Results
R1 🟢
R2 🟢
R3 🟢

Copy link
Member

@juliamagan juliamagan left a comment

Choose a reason for hiding this comment

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

LGTM

@jmv74211 jmv74211 merged commit c51f746 into master May 30, 2022
@jmv74211 jmv74211 deleted the feature/2287-move-get-datetime-diff-to-wazuh-testing branch May 30, 2022 07:28
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.

Move get_datetime_diff to wazuh_testing
4 participants