ci: fix flaky UI test (#17676)

This commit is contained in:
Luiz Aoqui 2023-06-22 23:07:36 -04:00 committed by GitHub
parent 7373261b58
commit f785da4748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -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',