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

[7.x] [SIEM][Detection Engine] Fixes skipped tests (#71347) #71357

Merged
merged 1 commit into from
Jul 10, 2020

Commits on Jul 10, 2020

  1. [SIEM][Detection Engine] Fixes skipped tests (elastic#71347)

    ## Summary
    
    * elastic#69632
    * Adds a retry loop in case of a network outage/issue which should increase the chances of success
    * If there is still an issue after the 20th try, then it moves on and there is a high likelihood the tests will continue without issues.
    * Adds console logging statements so we know if this flakiness happens again a bit more insight into why the network is behaving the way it is.
    * Helps prevent the other tests from being skipped in the future due to bad networking issues. 
    
    The errors that were coming back from the failed tests are in the `afterEach` and look to be network related or another test interfering:
    
    ```ts
    1) detection engine api security and spaces enabled
    01:59:54         find_statuses
    01:59:54           "after each" hook for "should return a single rule status when a single rule is loaded from a find status with defaults added":
    01:59:54       ResponseError: Response Error
    01:59:54        at IncomingMessage.response.on (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:287:25)
    01:59:54        at endReadableNT (_stream_readable.js:1145:12)
    01:59:54        at process._tickCallback (internal/process/next_tick.js:63:19)
    01:59:54  
    01:59:54               └- ✖ fail: "detection engine api security and spaces enabled find_statuses "after each" hook for "should return a single rule status when a single rule is loaded from a find status with defaults added""
    01:59:54               │
    01:59:54               └-> "after all" hook
    01:59:54             └-> "after all" hook
    01:59:54         │
    01:59:54         │42 passing (2.0m)
    01:59:54         │1 failing
    ```
    
    So this should fix it to where the afterEach calls try up to 20 times before giving up and then on giving up they move on with the hope a different test doesn't fail.
    
    
    ### Checklist
    - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios
    FrankHassanabad committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    781c23d View commit details
    Browse the repository at this point in the history