@@ -687,7 +687,7 @@ func TestClient(t *testing.T) {
687687 Data : failpoint.Data {
688688 FailCommands : []string {"find" , "insert" },
689689 BlockConnection : true ,
690- BlockTimeMS : 500 ,
690+ BlockTimeMS : 2000 ,
691691 },
692692 })
693693
@@ -697,13 +697,13 @@ func TestClient(t *testing.T) {
697697 wg .Add (50 )
698698
699699 for i := 0 ; i < 50 ; i ++ {
700- // Run 50 concurrent operations, each with a timeout of 50ms . Expect
700+ // Run 50 concurrent operations, each with a timeout of 1s . Expect
701701 // them to all return a timeout error because the failpoint
702- // blocks find operations for 50ms . Run 50 to increase the
702+ // blocks find operations for 2s . Run 50 to increase the
703703 // probability that an operation will time out in a way that
704704 // can cause a retry.
705705 go func () {
706- ctx , cancel := context .WithTimeout (context .Background (), 150 * time .Millisecond )
706+ ctx , cancel := context .WithTimeout (context .Background (), 1 * time .Second )
707707 err := tc .operation (ctx , mt .Coll )
708708 cancel ()
709709 assert .ErrorIs (mt , err , context .DeadlineExceeded )
@@ -733,6 +733,10 @@ func TestClient(t *testing.T) {
733733 "expected exactly 1 command started event per operation (50), but got %d" ,
734734 len (evts )+ pendingReadConns )
735735 mt .ClearEvents ()
736+
737+ // Wait for the failpoint to be unblocked.
738+ time .Sleep (2 * time .Second )
739+
736740 mt .ClearFailPoints ()
737741 })
738742 }
0 commit comments