kibana/x-pack/test/api_integration
Frank Hassanabad 4bdc17039b
[Security Solutions] end to end tests, adds more console logging, removes 200 expect statements (#116987)
## Summary

e2e tests are still seeing flake with conflicts and it looks like it _might_ be with querying and not with inserting data. Hard to tell. This PR:

* Adds more console logging when the response is not a 200
* Removes the 200 expect statement and hopes for the best but should blow up if it's not 200 in a different way and we will get the console logging statements.
* Fixes one other flake with the matrix histogram having different counts. We have encountered this before and are applying the same fix which is to just have it check > 0.
* This does fix the timeouts seen where 1 in every 1k rule runs, a rule will not fire until _after_ the 5 minute mark. The timeouts were seen when running the flake runner.


Flake failures around `conflict`:
https://github.com/elastic/kibana/issues/116926
https://github.com/elastic/kibana/issues/116904
https://github.com/elastic/kibana/issues/116231

Not saying this is going to fix those yet, but it's the last 200 ok's we did an expect on, so it might if we are ignoring the conflict. If it fails again I am hopeful beyond hope that we get the body message and line number within the utilities to determine where/why we are getting these from time to time. It does look to fix the timeouts when a rule misfires and slows down the rate at which we continuously query for rule results.

Failure around matrix histogram (The error messages are slightly different on CI each time):
https://github.com/elastic/kibana/issues/97365

Ran this with the flake runner across groups 11 and 12 100 times each and did not see the conflict crop up:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/128
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/129

The 1 failure in each of those runs were due to something on startup that prevented it from running.

### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-11-02 08:28:48 -06:00
..
apis [Security Solutions] end to end tests, adds more console logging, removes 200 expect statements (#116987) 2021-11-02 08:28:48 -06:00
services Removes supertest-as-promised dependency (#100486) 2021-08-16 18:01:34 -07:00
config.ts [RAC][Security Solution] Adds migration to new SecuritySolution rule types (#112113) 2021-10-26 16:56:40 -04:00
config_security_basic.ts [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
config_security_trial.ts [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00
ftr_provider_context.d.ts [kbn/test] move types/ftr into src (#99555) 2021-05-17 09:51:53 -07:00