Using the global wait_until makes it impossible to adjust the timeout based on the hardware the test is running on.
Fix that by using the mininode member function.
So for example, ./test/functional/p2p_getdata.py --timeout-factor=0.04
gives a timeout of 2.4 seconds.