tests: fix connection timeout when no external networks