Skip to content

Commit d974951

Browse files
authored
fix: list replication lag test failures (#225)
1 parent 98233a5 commit d974951

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

e2e/e2e.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ const putKeys = async (state, keys, { ttl, batchSize = 50 }) => {
6262
}
6363
const waitFor = (ms) => new Promise(resolve => setTimeout(resolve, ms))
6464
const listAll = async (state, options = {}) => {
65+
// since https://git.corp.adobe.com/CNA/adp-storage-state/pull/88 we are
66+
// listing against a replica so we need to wait for the replica to be in sync
67+
// to have exact results. The replication lag is about ~5ms, let's be
68+
// conservative to avoid test failures.
69+
waitFor(100)
6570
const acc = []
6671
for await (const { keys } of state.list(options)) {
6772
acc.push(...keys)

0 commit comments

Comments
 (0)