The getavaaddr_interval_test checks that the getavaaddr messages are accepted by the node by checking for a response. One of the condition to send addresses (and so reply to this request) is that the peer's address to share have a >= 0 availability score. The test currently ensure this by waiting for the peer to receive a poll message but this is not enough: the peer should also respond to the poll so the score is non negative.
This diff changes the test behavior to actually wait for the availability score to be > 0 (and recompute the statistics in the loop instead of only doing it once) so there is no race condition that could cause the test to be flaky.