Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Fix race on event handler test (#2232)
Browse files Browse the repository at this point in the history
Race checking the size of a channel.
  • Loading branch information
eduser25 authored Dec 22, 2020
1 parent 2861187 commit e111a40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kubernetes/event_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ var _ = Describe("Testing event handlers", func() {
}
handlers := GetKubernetesEventHandlers(testInformer, testProvider, shouldObserve, eventTypes)
handlers.AddFunc(&pod)
Expect(len(podAddChannel)).To(Equal(1))
an := <-podAddChannel
Expect(len(podAddChannel)).To(Equal(0))

// Pubsub msg
pubsubMsg, castOk := an.(events.PubSubMessage)
Expand Down

0 comments on commit e111a40

Please sign in to comment.