Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions test/extended/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,17 @@ var _ = g.Describe("[sig-auth][Feature:ProjectAPI] ", func() {
time.Sleep(5 * time.Second)
fromNowWatch, err := bobProjectClient.Projects().Watch(ctx, metav1.ListOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
select {
case event := <-fromNowWatch.ResultChan():
g.Fail(fmt.Sprintf("unexpected event %s %#v", event.Type, event.Object))
for {
select {
case event := <-fromNowWatch.ResultChan():
if event.Type == watch.Bookmark {
continue
}
g.Fail(fmt.Sprintf("unexpected event %s %#v", event.Type, event.Object))

case <-time.After(2 * time.Second):
case <-time.After(2 * time.Second):
return
}
Comment thread
ricardomaraschini marked this conversation as resolved.
}
})
})
Expand Down Expand Up @@ -275,6 +281,9 @@ func waitForOnlyAdd(projectName string, w watch.Interface) {
}
g.Fail(fmt.Sprintf("got unexpected project ADD waiting for %s: %v", project.Name, event))
}
if event.Type == watch.Bookmark {
continue
}
if event.Type == watch.Modified {
// ignore modifications from other projects
continue
Expand Down