Skip to content

Commit

Permalink
an attempt to fix "adds existing pod and processes an update event"
Browse files Browse the repository at this point in the history
getting 1 add event instead of 2.

Signed-off-by: Nadia Pinaeva <[email protected]>
  • Loading branch information
npinaeva committed Jul 4, 2023
1 parent ba599b6 commit cce672f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions go-controller/pkg/informer/informer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,16 @@ var _ = Describe("Informer Event Handler Tests", func() {
e.Run(1, stopChan)
}()

wait.PollImmediate(
err = wait.PollUntilContextTimeout(
context.Background(),
500*time.Millisecond,
5*time.Second,
func() (bool, error) {
true,
func(context.Context) (done bool, err error) {
return e.Synced(), nil
},
)
Expect(err).NotTo(HaveOccurred())

Eventually(func() (bool, error) {
pod, err := k.CoreV1().Pods(namespace).Get(context.TODO(), "foo", metav1.GetOptions{})
Expand Down

0 comments on commit cce672f

Please sign in to comment.