fix concurrent map writes (#3529)

Signed-off-by: Jeff <jeffzhang@yunify.com>
This commit is contained in:
zryfish
2021-03-22 13:14:14 +08:00
committed by GitHub
parent 9c614bef98
commit fb2db3e164
2 changed files with 30 additions and 10 deletions

View File

@@ -143,6 +143,8 @@ func TestNodesGetterGet(t *testing.T) {
}
nodeGot := got.(*corev1.Node)
// ignore last-annotated-at annotation
delete(nodeGot.Annotations, nodeAnnotatedAt)
if diff := cmp.Diff(nodeGot.Annotations, expectedAnnotations); len(diff) != 0 {
t.Errorf("%T, diff(-got, +expected), %v", expectedAnnotations, nodeGot.Annotations)
}