From f785da474876376387929dd93f8ced30cb5e6611 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Thu, 22 Jun 2023 23:07:36 -0400 Subject: [PATCH] ci: fix flaky UI test (#17676) --- ui/tests/acceptance/allocation-detail-test.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ui/tests/acceptance/allocation-detail-test.js b/ui/tests/acceptance/allocation-detail-test.js index 340da9014..9b79bdf2c 100644 --- a/ui/tests/acceptance/allocation-detail-test.js +++ b/ui/tests/acceptance/allocation-detail-test.js @@ -682,12 +682,12 @@ module('Acceptance | allocation detail (services)', function (hooks) { name: 'Service-haver', id: 'service-haver', namespaceId: 'default', - allocStatusDistribution: { - running: 1, - }, }); - const currentAlloc = server.db.allocations.findBy({ jobId: job.id }); + const runningAlloc = server.create('allocation', { + jobId: job.id, + forceRunningClientStatus: true, + }); const otherAlloc = server.db.allocations.reject((j) => j.jobId !== job.id); server.db.serviceFragments.update({ @@ -696,7 +696,7 @@ module('Acceptance | allocation detail (services)', function (hooks) { Status: 'success', Check: 'check1', Timestamp: 99, - Alloc: currentAlloc.id, + Alloc: runningAlloc.id, }, { Status: 'failure', @@ -705,21 +705,21 @@ module('Acceptance | allocation detail (services)', function (hooks) { propThatDoesntMatter: 'this object will be ignored, since it shared a Check name with a later one.', Timestamp: 98, - Alloc: currentAlloc.id, + Alloc: runningAlloc.id, }, { Status: 'success', Check: 'check2', Output: 'Two', Timestamp: 99, - Alloc: currentAlloc.id, + Alloc: runningAlloc.id, }, { Status: 'failure', Check: 'check3', Output: 'Oh no!', Timestamp: 99, - Alloc: currentAlloc.id, + Alloc: runningAlloc.id, }, { Status: 'success',