Skip to content

Commit a4aae59

Browse files
committed
removed unnecesery must clause
1 parent e92a164 commit a4aae59

1 file changed

Lines changed: 14 additions & 20 deletions

File tree

x-pack/plugins/task_manager/server/queries/task_claiming.test.ts

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -226,33 +226,27 @@ describe('TaskClaiming', () => {
226226
must: [
227227
{
228228
bool: {
229-
must: [
229+
should: [
230230
{
231231
bool: {
232-
should: [
233-
{
234-
bool: {
235-
must: [
236-
{ term: { 'task.status': 'idle' } },
237-
{ range: { 'task.runAt': { lte: 'now' } } },
238-
],
239-
},
240-
},
232+
must: [
233+
{ term: { 'task.status': 'idle' } },
234+
{ range: { 'task.runAt': { lte: 'now' } } },
235+
],
236+
},
237+
},
238+
{
239+
bool: {
240+
must: [
241241
{
242242
bool: {
243-
must: [
244-
{
245-
bool: {
246-
should: [
247-
{ term: { 'task.status': 'running' } },
248-
{ term: { 'task.status': 'claiming' } },
249-
],
250-
},
251-
},
252-
{ range: { 'task.retryAt': { lte: 'now' } } },
243+
should: [
244+
{ term: { 'task.status': 'running' } },
245+
{ term: { 'task.status': 'claiming' } },
253246
],
254247
},
255248
},
249+
{ range: { 'task.retryAt': { lte: 'now' } } },
256250
],
257251
},
258252
},

0 commit comments

Comments
 (0)