From f57129174a310f978e9d1214405b505fd9ae6d9f Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Fri, 5 Feb 2021 22:58:00 -0500 Subject: [PATCH 1/4] Changed the retry to a wait for condition which will keep trying for 20 seconds to see the container. Also changed the data test subject as there was another grokDebugger test subject just in case there was a clash. --- .../public/components/grok_debugger/grok_debugger.js | 2 +- .../test/functional/apps/grok_debugger/grok_debugger.js | 2 +- x-pack/test/functional/services/grok_debugger.js | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/x-pack/plugins/grokdebugger/public/components/grok_debugger/grok_debugger.js b/x-pack/plugins/grokdebugger/public/components/grok_debugger/grok_debugger.js index aa566b0562802..17a6408298b07 100644 --- a/x-pack/plugins/grokdebugger/public/components/grok_debugger/grok_debugger.js +++ b/x-pack/plugins/grokdebugger/public/components/grok_debugger/grok_debugger.js @@ -129,7 +129,7 @@ export class GrokDebuggerComponent extends React.Component { - + diff --git a/x-pack/test/functional/apps/grok_debugger/grok_debugger.js b/x-pack/test/functional/apps/grok_debugger/grok_debugger.js index 010341cedd3a7..f38d0c2e86436 100644 --- a/x-pack/test/functional/apps/grok_debugger/grok_debugger.js +++ b/x-pack/test/functional/apps/grok_debugger/grok_debugger.js @@ -13,7 +13,7 @@ export default function ({ getService, getPageObjects }) { const PageObjects = getPageObjects(['grokDebugger']); // FLAKY: https://github.com/elastic/kibana/issues/84440 - describe.skip('grok debugger app', function () { + describe('grok debugger app', function () { this.tags('includeFirefox'); before(async () => { await esArchiver.load('empty_kibana'); diff --git a/x-pack/test/functional/services/grok_debugger.js b/x-pack/test/functional/services/grok_debugger.js index 730b4ca60c05a..42a80edd70c85 100644 --- a/x-pack/test/functional/services/grok_debugger.js +++ b/x-pack/test/functional/services/grok_debugger.js @@ -13,7 +13,7 @@ export function GrokDebuggerProvider({ getService }) { const retry = getService('retry'); // test subject selectors - const SUBJ_CONTAINER = 'grokDebugger'; + const SUBJ_CONTAINER = 'grokDebuggerContainer'; const SUBJ_UI_ACE_EVENT_INPUT = `${SUBJ_CONTAINER} > aceEventInput > codeEditorContainer`; const SUBJ_UI_ACE_PATTERN_INPUT = `${SUBJ_CONTAINER} > acePatternInput > codeEditorContainer`; @@ -49,10 +49,8 @@ export function GrokDebuggerProvider({ getService }) { } async assertExists() { - await retry.try(async () => { - if (!(await testSubjects.exists(SUBJ_CONTAINER))) { - throw new Error('Expected to find the grok debugger'); - } + await retry.waitFor('Grok Debugger to exist', async () => { + return await testSubjects.exists(SUBJ_CONTAINER); }); } From ff7f2dd5b9a0ad69ae728f94b3c6d5c0984396b6 Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Fri, 5 Feb 2021 23:11:12 -0500 Subject: [PATCH 2/4] Added .only to be able to run the test repeatedly because group 13 is not in the flaky test runner. --- x-pack/test/functional/apps/grok_debugger/grok_debugger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/grok_debugger/grok_debugger.js b/x-pack/test/functional/apps/grok_debugger/grok_debugger.js index f38d0c2e86436..bee9602aca1ee 100644 --- a/x-pack/test/functional/apps/grok_debugger/grok_debugger.js +++ b/x-pack/test/functional/apps/grok_debugger/grok_debugger.js @@ -13,7 +13,7 @@ export default function ({ getService, getPageObjects }) { const PageObjects = getPageObjects(['grokDebugger']); // FLAKY: https://github.com/elastic/kibana/issues/84440 - describe('grok debugger app', function () { + describe.only('grok debugger app', function () { this.tags('includeFirefox'); before(async () => { await esArchiver.load('empty_kibana'); From c81c0f3a5bd1573af8cdc3dab32907c1ec024ee2 Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Fri, 5 Feb 2021 23:12:33 -0500 Subject: [PATCH 3/4] Added to group 11 because 13 is not in flaky test runner. Will revert after passing. --- x-pack/test/functional/apps/grok_debugger/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/test/functional/apps/grok_debugger/index.js b/x-pack/test/functional/apps/grok_debugger/index.js index fe43009dcc8bc..436c643d05b20 100644 --- a/x-pack/test/functional/apps/grok_debugger/index.js +++ b/x-pack/test/functional/apps/grok_debugger/index.js @@ -7,7 +7,7 @@ export default function ({ loadTestFile }) { describe('logstash', function () { - this.tags('ciGroup13'); + this.tags('ciGroup11'); loadTestFile(require.resolve('./grok_debugger')); }); From 00896fdbd042ea3ff36aef8d6b8c107d095bc144 Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Mon, 8 Feb 2021 19:37:22 -0500 Subject: [PATCH 4/4] Reverted change back to group 13 and removed the comment for the flaky test being skipped. --- x-pack/test/functional/apps/grok_debugger/grok_debugger.js | 3 +-- x-pack/test/functional/apps/grok_debugger/index.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional/apps/grok_debugger/grok_debugger.js b/x-pack/test/functional/apps/grok_debugger/grok_debugger.js index bee9602aca1ee..b2a1c5363fcb6 100644 --- a/x-pack/test/functional/apps/grok_debugger/grok_debugger.js +++ b/x-pack/test/functional/apps/grok_debugger/grok_debugger.js @@ -12,8 +12,7 @@ export default function ({ getService, getPageObjects }) { const PageObjects = getPageObjects(['grokDebugger']); - // FLAKY: https://github.com/elastic/kibana/issues/84440 - describe.only('grok debugger app', function () { + describe('grok debugger app', function () { this.tags('includeFirefox'); before(async () => { await esArchiver.load('empty_kibana'); diff --git a/x-pack/test/functional/apps/grok_debugger/index.js b/x-pack/test/functional/apps/grok_debugger/index.js index 436c643d05b20..fe43009dcc8bc 100644 --- a/x-pack/test/functional/apps/grok_debugger/index.js +++ b/x-pack/test/functional/apps/grok_debugger/index.js @@ -7,7 +7,7 @@ export default function ({ loadTestFile }) { describe('logstash', function () { - this.tags('ciGroup11'); + this.tags('ciGroup13'); loadTestFile(require.resolve('./grok_debugger')); });