         XCTAssertNil(error)
         if let data = data {
           XCTAssertEqual(String(data: data, encoding: .utf8), expectedResponse)
-          responses += 1
-
-          if responses == numberOfRequests {
-            completionHandlerExpectation.fulfill()
-          }
+          completionHandlerExpectation.fulfill()
         }
       }
     }


  func testServerStreaming() {
    let message = "foo bar baz"


    var expectedData = Data()
    var index = 0

    let numberOfRequests = 2_000

    let completionHandlerExpectation = expectation(description: "completion handler called")
    completionHandlerExpectation.expectedFulfillmentCount = numberOfRequests
    completionHandlerExpectation.assertForOverFulfill = true

    for i in 0..<numberOfRequests {
      let message = "foo \(i)"
