mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Actions] Better enqueue test (#112434)
* Try and add logging here * Fix linting * Only this test * Better logging * More debugging * More debug * Try something different * Better way to do the test * Get this PR ready Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
2548f9b323
commit
fb2ee109b8
2 changed files with 7 additions and 10 deletions
|
@ -213,6 +213,7 @@ function getNoAttemptsRateLimitedActionType() {
|
|||
});
|
||||
return {
|
||||
status: 'error',
|
||||
message: 'intentional failure from action',
|
||||
retry: new Date(params.retryAt),
|
||||
actionId: '',
|
||||
};
|
||||
|
|
|
@ -23,8 +23,7 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
const retry = getService('retry');
|
||||
const esTestIndexTool = new ESTestIndexTool(es, retry);
|
||||
|
||||
// Failing: See https://github.com/elastic/kibana/issues/111812
|
||||
describe.skip('enqueue', () => {
|
||||
describe('enqueue', () => {
|
||||
const objectRemover = new ObjectRemover(supertest);
|
||||
|
||||
before(async () => {
|
||||
|
@ -170,21 +169,17 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
'task.taskType': 'actions:test.no-attempts-rate-limit',
|
||||
},
|
||||
},
|
||||
{
|
||||
term: {
|
||||
'task.status': 'running',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
expect((runningSearchResult.body.hits.total as estypes.SearchTotalHits).value).to.eql(1);
|
||||
const total = (runningSearchResult.body.hits.total as estypes.SearchTotalHits).value;
|
||||
expect(total).to.eql(1);
|
||||
});
|
||||
|
||||
await retry.try(async () => {
|
||||
const searchResult = await es.search({
|
||||
const runningSearchResult = await es.search({
|
||||
index: '.kibana_task_manager',
|
||||
body: {
|
||||
query: {
|
||||
|
@ -200,7 +195,8 @@ export default function ({ getService }: FtrProviderContext) {
|
|||
},
|
||||
},
|
||||
});
|
||||
expect((searchResult.body.hits.total as estypes.SearchTotalHits).value).to.eql(0);
|
||||
const total = (runningSearchResult.body.hits.total as estypes.SearchTotalHits).value;
|
||||
expect(total).to.eql(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue