Skip to content

Commit

Permalink
Fixes Failing test: Task Manager MGet Claimer Functional Tests.x-pack…
Browse files Browse the repository at this point in the history
…/test/task_manager_claimer_mget/test_suites/task_manager/migrations·ts - task_manager with mget task claimer migrations 8.5.0 migrates active tasks to set enabled to true (elastic#192463)

Resolves elastic#190454

## Summary

Updated the query to only return tasks. The flakiness was caused by the
query sometimes returning the new `background-task-node` document type
in the TM index. Also saw another flake where the task manager metrics
comparisons weren't returning correctly because the metrics reset, so
increased the metrics reset interval slightly.

Ran flaky test runner 2x200 times successfully:
*
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6911
*
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6913
  • Loading branch information
ymao1 authored Sep 11, 2024
1 parent 9accb33 commit 9cd3c4a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions x-pack/test/task_manager_claimer_mget/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
'--xpack.task_manager.monitored_aggregated_stats_refresh_rate=5000',
'--xpack.task_manager.ephemeral_tasks.enabled=false',
'--xpack.task_manager.ephemeral_tasks.request_capacity=100',
'--xpack.task_manager.metrics_reset_interval=40000',
`--xpack.stack_connectors.enableExperimental=${JSON.stringify(['crowdstrikeConnectorOn'])}`,
...findTestPluginPaths(path.resolve(__dirname, 'plugins')),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export default function createGetTests({ getService }: FtrProviderContext) {
const ALERT_ID = '0359d7fcc04da9878ee9aadbda38ba55';
const ACTION_TASK_PARAMS_ID = '6e96ac5e648f57523879661ea72525b7';

// FLAKY: https://github.com/elastic/kibana/issues/190454
describe.skip('migrations', () => {
describe('migrations', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/task_manager_tasks');
});
Expand Down Expand Up @@ -147,7 +146,9 @@ export default function createGetTests({ getService }: FtrProviderContext) {
size: 100,
body: {
query: {
match_all: {},
bool: {
filter: [{ term: { type: 'task' } }],
},
},
},
},
Expand All @@ -174,7 +175,9 @@ export default function createGetTests({ getService }: FtrProviderContext) {
size: 100,
body: {
query: {
match_all: {},
bool: {
filter: [{ term: { type: 'task' } }],
},
},
},
},
Expand All @@ -200,7 +203,13 @@ export default function createGetTests({ getService }: FtrProviderContext) {
{
index: '.kibana_task_manager',
size: 100,
body: { query: { match_all: {} } },
body: {
query: {
bool: {
filter: [{ term: { type: 'task' } }],
},
},
},
},
{ meta: true }
);
Expand Down Expand Up @@ -233,7 +242,13 @@ export default function createGetTests({ getService }: FtrProviderContext) {
{
index: '.kibana_task_manager',
size: 100,
body: { query: { match_all: {} } },
body: {
query: {
bool: {
filter: [{ term: { type: 'task' } }],
},
},
},
},
{ meta: true }
);
Expand Down

0 comments on commit 9cd3c4a

Please sign in to comment.