Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function wait(
callback: () => any = () => undefined,
{timeout = 4500, interval = 50} = {}, // tslint:disable-line
): Promise<{}> {
return waitForExpect(callback, timeout, interval)
}
function wait(callback = () => {}, { timeout = 4500, interval = 50 } = {}) {
return waitForExpect(callback, timeout, interval);
}
function wait(callback = () => {}, {timeout = getConfig().asyncUtilTimeout, interval = 50} = {}) {
return waitForExpect(callback, timeout, interval)
}
function waitForExpect (callback = () => {}, { timeout = 1900, interval = 50 } = {}) {
return _waitForExpect(callback, timeout, interval)
}
cloudAwareDatastore.shutdownHook = async () => {
await waitForExpect(async () => {
console.log("Checking consistency...");
const consistency = await Datastores.checkConsistency(diskDatastore, firebaseDatastore);
if (! consistency.consistent) {
console.log("Filesystems are NOT consistent: ", consistency.manifest0, consistency.manifest1);
}
assert.ok(consistency.consistent, "Datastores are not consistent");
}, TIMEOUT);
};