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 test_ignore_valid.py - Add timeout variable #1929

Merged
merged 6 commits into from
Sep 30, 2021

Conversation

Deblintrake09
Copy link
Contributor

@Deblintrake09 Deblintrake09 commented Sep 24, 2021

Related issue
#1889 - FIM Windows Agent - Case: Check files are ignored in subdirectory according to configuration.

Configuration options

Agent Version QA branch
v4.2.1 Windows 1873-4.2.1-fim-windows-agent
Disable Modules: SCA, Rootcheck, Syscollector and Active Response

Description

During the research phase, tests were failing erratically with Timeout errors from the FileMonitor. By trying out with bigger timeouts, all tests passed.

  • The default_timeout value is set to 10.
  • Tried with timeout = 20 - 3 Instances 🟢
  • Tried with timeout = 15 - 3 instances 🟢

It was proposed to change the timeout, but the default_timeout variable affects all tests that use the FileMonitor, it temporarily, until tests are reworked, adding a local timeout variable, was a proposed fix.

  • Tried creating the variable ignore_valid_timeout with a value of 15, and run test. It failed
  • Tried with a timeout of 20 - it passed.

Tests

Results Date By Status Notes
ResultsIgnoreValid15sec.zip 2021/09/23 @Deblintrake09 🟢 default_timeout = 15 seconds
ResultsIgnoreValid15sec2.zip 2021/09/23 @Deblintrake09 🟢 default_timeout = 15 seconds
ResultsIgnoreValid15sec3.zip 2021/09/23 @Deblintrake09 🟢 default_timeout = 15 seconds
ResultsIgnoreValidfix20sec.zip 2021/09/24 @Deblintrake09 🟢 Test with local variable in test_ignore_valid.py - timetout = 20 seconds

UPDATE 2021/09/29

Description

After committing changes for automating module deactivation for the tests, the tests started to fail. Tests were giving unstable results, failing on tests that had already passed.
After creating a new test environment from scratch on branch 1873-4.2.1-fim-windows-agent with the most recent changes, and testing with disabled modules. All tests passed with the default timeout of 10 seconds.
On the latest commit on the branch, the only change applied, is modifying the yaml files to automate module deactivation. Running the tests with some of the modules running, causes fail state.

Test

Results Date By Status Notes
ResultsIgnoreValid.zip 2021/09/28 @Deblintrake09 🟢 All 4 Modules Disabled
ResultsIgnoreValid2.zip 2021/09/28 @Deblintrake09 🟢 All 4 Modules Disabled
ResultsIgnoreValid3.zip 2021/09/28 @Deblintrake09 🟢 All 4 Modules Disabled
ResultsIgnoreValid-Fix.zip 2021/09/28 @Deblintrake09 🟢 All 4 Modules Disabled using wazuh_conf_win32.yaml

Update 2021/09/29 - 2

  • Merged latest changes from 1873-4.2.1-fim-windows-agent branch into working branch.
  • Run tests with latest changes 🟢
Results Date By Status Notes
ResultsIgnoreValid-LatestChanges.zip 2021/09/29 @Deblintrake09 🟢

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.

Please, apply the last changes from 1873-4.2.1-fim-windows-agent branch.

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.

Results Date By Status
ResultsTestIngore2.zip 2021/09/29 Seyla 🟢
ResultsTestIgnore.zip 2021/09/29 Seyla 🟢
ResultsIgnore.zip 2021/09/30 Seyla 🟢

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.

FIM Windows Agent - Case: Check files are ignored in subdirectory according to configuration.
2 participants