Skip to content

Fixes flakey TestNodeWatcher test#2168

Merged
c-kruse merged 1 commit intoskupperproject:mainfrom
c-kruse:testfix-testnodewatcher-race
Jun 25, 2025
Merged

Fixes flakey TestNodeWatcher test#2168
c-kruse merged 1 commit intoskupperproject:mainfrom
c-kruse:testfix-testnodewatcher-race

Conversation

@c-kruse
Copy link
Contributor

@c-kruse c-kruse commented Jun 24, 2025

TestNodeWatcher seemed to be failing due to a race between the testing goroutine exercising the fake k8s client (creating and deleting resources) and the goroutine of the informer syncronizing its cache and invoking handlers/callbacks based on the current state of a resources. This change introduces blocking in the test goroutine - expecting callbacks for the initial resource state to run before continuing to update resources.

TestNodeWatcher seemed to be failing due to a race between the testing
goroutine exercising the fake k8s client (creating and deleting
resources) and the goroutine of the informer syncronizing its cache and
invoking handlers/callbacks based on the current state of a resources.
This change introduces blocking in the test goroutine - expecting
callbacks for the initial resource state to run before continuing to
update resources.

Signed-off-by: Christian Kruse <christian@c-kruse.com>
@c-kruse
Copy link
Contributor Author

c-kruse commented Jun 24, 2025

Part of #2164

@c-kruse c-kruse requested review from fgiorgetti and nluaces June 24, 2025 19:45
@nluaces nluaces added the do-not-merge Work In Progress label Jun 25, 2025
@c-kruse c-kruse force-pushed the testfix-testnodewatcher-race branch from c1cb766 to 8d8a7d6 Compare June 25, 2025 17:18
@c-kruse c-kruse removed the do-not-merge Work In Progress label Jun 25, 2025
Copy link
Member

@fgiorgetti fgiorgetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@c-kruse c-kruse merged commit aa08ac3 into skupperproject:main Jun 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants