kubeadmiral
kubeadmiral copied to clipboard
Accidental UT errors
link: https://github.com/kubewharf/kubeadmiral/actions/runs/6307418487/job/17124013179?pr=226
The error case is t.Run("ClusterEventHandlers should receive correct old and new clusters", func(t *testing.T)
.
I ran it locally multiple times and found no similar errors.
I feel that there is a small time difference between the function entering assertionCh and calling callback, which is captured by the test case. I think it would be better to put the callBackCount.Add(1)
before the assertionCh operation.
/cc @limhawjia