[V3] add functional test for #test_connection

rebased #766.