mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
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:
parent
84dc704679
commit
7dc075673c
@ -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()
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user