maistra / istio

Apache License 2.0
94 stars 92 forks source link

OSSM-6694 Fix federation's resourceManager.HasSynced() and flaky TestStatusManager #1038

Closed luksa closed 2 months ago

luksa commented 2 months ago

The federation controller's HasSynced() function only checked if some of its informers are synced instead of checking all of them.

The TestStatusManager test didn't use this HasSynced(), but called the HasSynced() function of some informers directly. It didn't check all informers that it should have, most importantly the pod informer.

This caused the test to be flaky, because the removeDeadPods function, which removes PodPeerDiscoveryStatuses associated with non-existent pods, erroneously removed the status that the test was checking. This happened when the podInformer wasn't yet synced and made it look as though the pod didn't exist.