mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Fix unknown product test flaky behavior (#148616)
Fixes https://github.com/elastic/kibana/issues/129754 The failing integration test is querying the `/api/status` endpoint before Kibana and ES are completely initialized, and thus, it is getting a _unavailable: Waiting for Elasticsearch_ instead of the expected _critical_. The proposed fix consists in awaiting a few milliseconds, in order to give the `debounceTime` operators enough time to propagate the right status. Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
15a4a00693
commit
9f39b78562
1 changed files with 5 additions and 1 deletions
|
@ -69,7 +69,7 @@ function createFakeElasticsearchServer() {
|
|||
}
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/129754
|
||||
describe.skip('fake elasticsearch', () => {
|
||||
describe('fake elasticsearch', () => {
|
||||
let esServer: http.Server;
|
||||
let kibanaServer: Root;
|
||||
let kibanaHttpServer: http.Server;
|
||||
|
@ -81,6 +81,10 @@ describe.skip('fake elasticsearch', () => {
|
|||
const kibanaPreboot = await kibanaServer.preboot();
|
||||
kibanaHttpServer = kibanaPreboot.http.server.listener; // Mind that we are using the prebootServer at this point because the migration gets hanging, while waiting for ES to be correct
|
||||
await kibanaServer.setup();
|
||||
// give kibanaServer's status Observables enough time to bootstrap
|
||||
// and emit a status after the initial "unavailable: Waiting for Elasticsearch"
|
||||
// see https://github.com/elastic/kibana/issues/129754
|
||||
await new Promise((resolve) => setTimeout(resolve, 500));
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue