Fix data race issue in unit test

TestDispatchingBookmarkEventsWithConcurrentStop can use processEvent
instead of `dispatchEvent` to avoid data race conditions with
`Cacher.watchersBuffer`.
This commit is contained in:
Abu Kashem 2020-03-16 17:43:32 -04:00
parent 84dc704679
commit 7dc075673c
No known key found for this signature in database
GPG Key ID: 76146D1A14E658ED

View File

@ -793,7 +793,7 @@ func TestDispatchingBookmarkEventsWithConcurrentStop(t *testing.T) {
wg := sync.WaitGroup{}
wg.Add(2)
go func() {
cacher.dispatchEvent(bookmark)
cacher.processEvent(bookmark)
wg.Done()
}()