bgp test: return error from upsertBGPCC#44545
Merged
joestringer merged 1 commit intocilium:mainfrom Feb 27, 2026
Merged
Conversation
Contributor
Author
|
/test |
Changes upsertBGPCC helper function to return an error so it can handle EventuallyWith test case. Signed-off-by: Liyi Huang <liyi.huang@isovalent.com>
19d8e58 to
e1e13a7
Compare
Contributor
Author
|
/test |
joestringer
reviewed
Feb 27, 2026
| if tt.FinalClusterConfigs != nil { | ||
| for _, clusterConfig := range tt.FinalClusterConfigs { | ||
| upsertBGPCC(req, ctx, f, clusterConfig) | ||
| if err := upsertBGPCC(ctx, f, clusterConfig); !assert.NoError(c, err) { |
Member
There was a problem hiding this comment.
nit: !assert.NoError() is pretty confusing due to the way different people interpret double negatives. Assertions should probably be unconditional too, or parameterized in the test if there's a legitimate error condition the test is looking for.
Member
There was a problem hiding this comment.
I'll go ahead and merge this as-is given the approval from @rastislavs but this seems like some minor tech debt we should consider improving on (also for all other instances in this testsuite, cc @cilium/sig-bgp ).
liyihuang
added a commit
to liyihuang/cilium
that referenced
this pull request
Mar 1, 2026
Change the double negatives based on the comment cilium#44545 (comment). This update affects the BGP test cases as well as ClusterMesh and IPAM components. Signed-off-by: Liyi Huang <liyi.huang@isovalent.com>
liyihuang
added a commit
to liyihuang/cilium
that referenced
this pull request
Mar 1, 2026
Change the double negatives based on the comment cilium#44545 (comment). This update affects the BGP test cases as well as ClusterMesh and IPAM components based on search using assert.No Signed-off-by: Liyi Huang <liyi.huang@isovalent.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes upsertBGPCC helper function to return an error so it can handle EventuallyWith test case.
running go test -c ./operator/pkg/bgp && stress ./bgp.test for 5 mins now and dont see the issue anymore
Fixes: #44434