kubeadmiral icon indicating copy to clipboard operation
kubeadmiral copied to clipboard

Accidental UT errors

Open Poor12 opened this issue 1 year ago • 1 comments

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.

Poor12 avatar Sep 26 '23 03:09 Poor12

/cc @limhawjia

Poor12 avatar Sep 26 '23 03:09 Poor12