Fix flaky test_debug_info. (#31675)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31675
This test could be flaky since there could be inflight RPC requests as
part of startup which might not have finished. As a result, if they finish
between the different calls to retrieve debug_info, there could be a problem
since we would report separate information. As a result, we wait to ensure
the metrics stabilize to avoid flakiness.
ghstack-source-id: 96188488
Test Plan: waitforbuildbot
Differential Revision: D19242588
fbshipit-source-id: 8f3db7e7365acbd3742e6ec0c2ddcca68f27db9e