Skip to content

Commit

Permalink
fix: list replication lag test failures (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzraho authored Feb 18, 2025
1 parent 98233a5 commit d974951
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions e2e/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ const putKeys = async (state, keys, { ttl, batchSize = 50 }) => {
}
const waitFor = (ms) => new Promise(resolve => setTimeout(resolve, ms))
const listAll = async (state, options = {}) => {
// since https://git.corp.adobe.com/CNA/adp-storage-state/pull/88 we are
// listing against a replica so we need to wait for the replica to be in sync
// to have exact results. The replication lag is about ~5ms, let's be
// conservative to avoid test failures.
waitFor(100)
const acc = []
for await (const { keys } of state.list(options)) {
acc.push(...keys)
Expand Down

0 comments on commit d974951

Please sign in to comment.