On slow machines the node can see the connection to the test framework peers before the python network thread is marked as connected, causing the test to fail.
This diff fixes it byt waiting for the connection to be marked as established on the python side.
Fixes https://build.bitcoinabc.org/viewLog.html?buildId=447123&buildTypeId=BitcoinABC_Master_BitcoinAbcMasterWOWallet&tab=buildLog and
https://build.bitcoinabc.org/viewLog.html?buildId=449892&buildTypeId=BitcoinABC_Master_CrossBuilds_CrossBuildLinux32&tab=buildLog