Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

identity: deflake test TestGetIdentity #29720

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

mhofstetter
Copy link
Member

Currently, the test TestGetIdentity fails with the following error.

--- FAIL: TestGetIdentity (0.85s)
    --- FAIL: TestGetIdentity/Multiple_identities (0.26s)
        identity_test.go:226: Identity not found in the store

The reason is that the watch of the backend (started in its own goroutine) might not be ready when the test starts to create test identities.

Therefore, this PR introduces that the test waits with its continuation until the listener is ready.

Fixes: #23856

Currently, the test `TestGetIdentity` fails with the following error.

```
--- FAIL: TestGetIdentity (0.85s)
    --- FAIL: TestGetIdentity/Multiple_identities (0.26s)
        identity_test.go:226: Identity not found in the store
```

The reason is that the watch of the backend (started in its own
goroutine) might not be ready when the test starts to create test
identities.

Therefore, this commit introduces that the test waits with its
continuation until the watch is ready.

Fixes: cilium#23856

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter added kind/bug/CI This is a bug in the testing code. area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. labels Dec 8, 2023
@mhofstetter
Copy link
Member Author

/test

@mhofstetter mhofstetter marked this pull request as ready for review December 8, 2023 08:22
@mhofstetter mhofstetter requested a review from a team as a code owner December 8, 2023 08:22
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Dec 13, 2023
@aanm aanm added this pull request to the merge queue Dec 14, 2023
Merged via the queue into cilium:main with commit 4838ca2 Dec 14, 2023
62 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/identitybackend-fix branch December 14, 2023 12:55
@joestringer joestringer added the needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch label Dec 15, 2023
@pippolo84 pippolo84 mentioned this pull request Jan 2, 2024
17 tasks
@pippolo84 pippolo84 added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Jan 2, 2024
@aanm aanm added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. kind/bug/CI This is a bug in the testing code. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: Runtime: TestGetIdentity/Multiple_identities: Identity not found in the store
5 participants