Skip to content

Commit

Permalink
fix(tests/locking): Adjust test to new locking behavior
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Dec 20, 2023
1 parent c667d53 commit 3b86fb7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3199,18 +3199,26 @@ describe('Floccus', function() {
await withSyncConnection(account1, async() => {
console.log('Syncing account 1')
console.log('Starting sync with account 2')
let error

Check failure on line 3202 in src/test/test.js

View workflow job for this annotation

GitHub Actions / js node20.x

'error' is defined but never used

Check failure on line 3202 in src/test/test.js

View workflow job for this annotation

GitHub Actions / init (20.x, 10.x)

'error' is defined but never used
sync2 = account2.sync()
sync2.then(() => {
console.log('Finished sync with account 2')
resolved = true
})
await new Promise(resolve => setTimeout(resolve, 60000))
expect(account2.getData().error).to.be.not.ok
expect(resolved).to.equal(false)
expect(account2.getData().scheduled).to.be.true
expect(resolved).to.equal(true)
})
console.log('Finished sync with account 1')
sync2 = account2.sync()
sync2.then(() => {
console.log('Finished sync with account 2')
resolved = true
})
await new Promise(resolve => setTimeout(resolve, 60000))
expect(account2.getData().error).to.be.not.ok
expect(account2.getData().scheduled).to.be.false
expect(resolved).to.equal(true)
})
it('should propagate edits using "last write wins"', async function() {
Expand Down

0 comments on commit 3b86fb7

Please sign in to comment.