adminsettings test: Fix restart detection
We cannot guarantee that the system time on SauceLabs and Github is in sync. In case the SauceLabs runner's clock is slow the test would have failed.pull/5119/head
parent
d262e31bbf
commit
cc6fda6916
|
@ -69,15 +69,15 @@ describe('Admin > Settings', function () {
|
|||
return null;
|
||||
}
|
||||
};
|
||||
let oldStartTime;
|
||||
await helper.waitForPromise(async () => {
|
||||
const startTime = await getStartTime();
|
||||
return startTime != null && startTime > 0 && Date.now() > startTime;
|
||||
oldStartTime = await getStartTime();
|
||||
return oldStartTime != null && oldStartTime > 0;
|
||||
}, 1000, 500);
|
||||
const clickTime = Date.now();
|
||||
helper.admin$('#restartEtherpad').click();
|
||||
await helper.waitForPromise(async () => {
|
||||
const startTime = await getStartTime();
|
||||
return startTime != null && startTime >= clickTime;
|
||||
return startTime != null && startTime > oldStartTime;
|
||||
}, 60000, 500);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue