@@ -388,20 +388,14 @@ func TestPingLoop(t *testing.T) {
388388
389389 // This one is just for coverage, so we know we're hitting the
390390 // branch that drops extra pings.
391- runClientTest (t , config , io .EOF , nil , []TestAction {
391+ runClientTest (t , config , io .EOF , func (c * Client ) {
392+ c .incomingPongChan = make (chan string )
393+ handlePong (c , MustParseMessage ("PONG :hello 1" ))
394+ }, []TestAction {
392395 ExpectLine ("PASS :test_pass\r \n " ),
393396 ExpectLine ("NICK :test_nick\r \n " ),
394397 ExpectLine ("USER test_user 0.0.0.0 0.0.0.0 :test_name\r \n " ),
395398 SendLine ("001 :hello_world\r \n " ),
396-
397- // It's a buffered channel of 5, so we want to send at least 6 of them
398- SendLine ("PONG :hello 1\r \n " ),
399- SendLine ("PONG :hello 2\r \n " ),
400- SendLine ("PONG :hello 3\r \n " ),
401- SendLine ("PONG :hello 4\r \n " ),
402- SendLine ("PONG :hello 5\r \n " ),
403- SendLine ("PONG :hello 6\r \n " ),
404- SendLine ("PONG :hello 7\r \n " ),
405399 })
406400
407401 // Successful ping with write error
0 commit comments