         pingsWithIntervalExpectation = XCTestExpectation(description: "pingsWithIntervalExpectation")
         socket.connect()
         socket.ping(interval: Self.repeatedPingInterval)
-        wait(for: [pingsWithIntervalExpectation!], timeout: Self.expectationTimeout)
+        wait(for: [pingsWithIntervalExpectation!], timeout: Self.expectationTimeout * 2)
     }
 
     func testReceiveError() {

    var shouldDisconnectImmediately: Bool!
    var receivedPongTimestamps = [Date]()
    static let expectationTimeout = 5.0
    static let repeatedPingInterval = 0.5

    override func setUp() {
        super.setUp()


        if receivedPongTimestamps.count == 5 {
            let timestampOffsets = zip(receivedPongTimestamps.dropFirst(), receivedPongTimestamps).map { $0.timeIntervalSince($1) }
            print("DIFFS: \(timestampOffsets)")
            for offset in timestampOffsets {
                XCTAssertEqual(offset, Self.repeatedPingInterval, accuracy: 0.1)
            }
            pingsWithIntervalExpectation?.fulfill()
        }
