Fail faster when in bad state.
What does this MR do?
When running elasticsearch tests on my development machine and elasticsearch location was not properly set in qa/qa/ee/resource/settings/elasticsearch.rb @es_url = 'http://localhost:9200'
the tests would take a very long time to fail, about 30 minutes.
In this MR I've made a change to add a trivial elasticsearch and check the response code for a 500 error (of any kind matching 5XX where 'X' is any single [positive] integer). If there was a 500 type error the tests fail in about 2 minutes now as opposed to 30.
There's probably a faster way to fail, but I figured this was a good place to start as it's a fail speed increase on the order of 10x.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team