Skip to content

Commit

Permalink
inc timeouts to stabilize observequery unit tests which are flakey in…
Browse files Browse the repository at this point in the history
… circleci
  • Loading branch information
svidgen authored and david-mcafee committed Jun 17, 2022
1 parent b5c6825 commit 8b6728d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/datastore/__tests__/DataStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
})
);
}
}, 1);
}, 100);
} catch (error) {
done(error);
}
Expand Down Expand Up @@ -433,7 +433,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
((DataStore as any).sync as any).getModelSyncedStatus({})
).toBe(true);

await pause(1);
await pause(100);
const itemToEdit = (
await DataStore.query(Post, p => p.title('contains', 'include'))
).pop();
Expand Down Expand Up @@ -470,7 +470,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
// "the post # - include"
// to
// "edited post - omit"
await pause(1);
await pause(100);
((DataStore as any).sync as any).getModelSyncedStatus = (model: any) =>
true;

Expand All @@ -484,7 +484,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
draft.title = 'first edited post - omit';
})
);
}, 1);
}, 100);
} catch (error) {
done(error);
}
Expand Down Expand Up @@ -566,7 +566,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
setTimeout(async () => {
const itemToDelete = (await DataStore.query(Post)).pop();
await DataStore.delete(itemToDelete);
}, 1);
}, 100);
} catch (error) {
done(error);
}
Expand Down Expand Up @@ -605,7 +605,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
setTimeout(async () => {
const itemToDelete = (await DataStore.query(Post)).pop();
await DataStore.delete(itemToDelete);
}, 1);
}, 100);
} catch (error) {
done(error);
}
Expand Down Expand Up @@ -659,7 +659,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
})
);
}
}, 1);
}, 100);
} catch (error) {
done(error);
}
Expand Down Expand Up @@ -715,7 +715,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
})
);
}
}, 1);
}, 100);
} catch (error) {
done(error);
}
Expand Down Expand Up @@ -775,7 +775,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
})
);
}
}, 1);
}, 100);
} catch (error) {
done(error);
}
Expand Down Expand Up @@ -849,7 +849,7 @@ describe('DataStore observeQuery, with fake-indexeddb and fake sync', () => {
})
);
}
}, 1);
}, 100);
} catch (error) {
done(error);
}
Expand Down

0 comments on commit 8b6728d

Please sign in to comment.