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 GCloud IT: test_max_messages error #3006

Merged
merged 9 commits into from
Jun 28, 2022
Merged

Conversation

CamiRomero
Copy link
Contributor

@CamiRomero CamiRomero commented Jun 15, 2022

Related issue
Close #3033

Description

The test test_max_messages was a flaky test because sometimes the test takes the last log received with the amount 0. To solve this problem:

  • We changed the callback function callback_received_messages_number, now returning all the matches.
  • We need to refactor the test in order to use the new callback function
  • We add a new assertion that checks that the module will only pull messages up to the limit

Modules Involved:

  • tests/integration/test_gcloud/test_functionality/test_max_messages.py
  • deps/wazuh_testing/wazuh_testing/gcloud.py

Logs example

Tests Results

Test Path Os/Type Execution Type Results Date By
tests/integration/test_gcloud/test_functionality/test_max_messages.py CentOS - Manager Jenkins 🟢 🟢 🟢 27/06/2022 @CamiRomero

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.

@CamiRomero CamiRomero self-assigned this Jun 15, 2022
@CamiRomero CamiRomero marked this pull request as draft June 15, 2022 13:05
@CamiRomero CamiRomero marked this pull request as ready for review June 15, 2022 14:22
Copy link
Member

@damarisg damarisg left a comment

Choose a reason for hiding this comment

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

Tests Results

Test Path Os/Type Execution Type Results Date By
tests/integration/test_gcloud/test_functionality/test_max_messages.py CentOS - Manager Jenkins 🟢 🟢 🟢 🟢 16/06/2022 Seyla

@damarisg damarisg linked an issue Jun 24, 2022 that may be closed by this pull request
1 task
@jmv74211 jmv74211 merged commit 37359e4 into 4.3 Jun 28, 2022
@jmv74211 jmv74211 deleted the 2907-fix-max-messages-test branch June 28, 2022 09:37
@jmv74211 jmv74211 self-requested a review September 20, 2022 10:40
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.

Enhancement - Fix GCloud IT: test_max_messages error (2/2)
3 participants