Fix test script for connect >= 3.