Closed grgbkr closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/rocicorp/replicache/ERHX1U3sVmt4bxQFD4KpeZ9hLnzX
✅ Preview: https://replicache-git-grgbkr-persist-flakiness-rocicorp.vercel.app
Problem replicache-persist.test is flacky on webkit because the persist process does not always complete before we create a new replicache and try to read the persisted data. This happens more on webkit because it uses a timeout rather than request idle callback to start persist.
Solution Wait for persist to complete (detected by polling the ClientMap) before creating a new Replicache and verifying it bootstraps from the persisted data.