kubewharf / kubeadmiral

Multi-Cluster Kubernetes Orchestration
https://kubeadmiral.io
Apache License 2.0
808 stars 97 forks source link

Accidental UT errors #241

Open Poor12 opened 1 year ago

Poor12 commented 1 year ago

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 commented 1 year ago

/cc @limhawjia