mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 12:46:46 +00:00
Fix flaky integration tests
This commit is contained in:
@ -39,6 +39,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
||||
* Ensure DoH is used at startup to load users for the initial auth.
|
||||
* Issue causing deadlock when reloading users keys due to double-locking of a mutex.
|
||||
* Correctly handle failure to unlock single key.
|
||||
* GODT-479 Fix flaky integration tests.
|
||||
|
||||
## [v1.2.7] Donghai-hotfix - beta (2020-05-07)
|
||||
|
||||
|
||||
@ -28,6 +28,17 @@ import (
|
||||
|
||||
// TestSync triggers a sync of the store.
|
||||
func (store *Store) TestSync() {
|
||||
store.lock.Lock()
|
||||
defer store.lock.Unlock()
|
||||
|
||||
// Sync can happen any time. Sync assigns sequence numbers and UIDs
|
||||
// in the order of fetching from the server. We expect in the test
|
||||
// that sequence numbers and UIDs are assigned in the same order as
|
||||
// written in scenario setup. With more than one sync that cannot
|
||||
// be guaranteed so once test calls this function, first it has to
|
||||
// delete previous any already synced sequence numbers and UIDs.
|
||||
_ = store.truncateMailboxesBucket()
|
||||
|
||||
store.triggerSync()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user