Fixed connection timeout test

#2568