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

View file

@ -682,12 +682,12 @@ module('Acceptance | allocation detail (services)', function (hooks) {
name: 'Service-haver', name: 'Service-haver',
id: 'service-haver', id: 'service-haver',
namespaceId: 'default', 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); const otherAlloc = server.db.allocations.reject((j) => j.jobId !== job.id);
server.db.serviceFragments.update({ server.db.serviceFragments.update({
@ -696,7 +696,7 @@ module('Acceptance | allocation detail (services)', function (hooks) {
Status: 'success', Status: 'success',
Check: 'check1', Check: 'check1',
Timestamp: 99, Timestamp: 99,
Alloc: currentAlloc.id, Alloc: runningAlloc.id,
}, },
{ {
Status: 'failure', Status: 'failure',
@ -705,21 +705,21 @@ module('Acceptance | allocation detail (services)', function (hooks) {
propThatDoesntMatter: propThatDoesntMatter:
'this object will be ignored, since it shared a Check name with a later one.', 'this object will be ignored, since it shared a Check name with a later one.',
Timestamp: 98, Timestamp: 98,
Alloc: currentAlloc.id, Alloc: runningAlloc.id,
}, },
{ {
Status: 'success', Status: 'success',
Check: 'check2', Check: 'check2',
Output: 'Two', Output: 'Two',
Timestamp: 99, Timestamp: 99,
Alloc: currentAlloc.id, Alloc: runningAlloc.id,
}, },
{ {
Status: 'failure', Status: 'failure',
Check: 'check3', Check: 'check3',
Output: 'Oh no!', Output: 'Oh no!',
Timestamp: 99, Timestamp: 99,
Alloc: currentAlloc.id, Alloc: runningAlloc.id,
}, },
{ {
Status: 'success', Status: 'success',