Add conditional compilation around `connectionTestExpectation` to avoid unused variable warning