                     XCTAssertEqual(response.status, .noContent)
                 }
 
-                wait(for: [expectation], timeout: 2.1)
+                wait(for: [expectation], timeout: 1.01)
             }
 
             let delay = secondEventTimestamp.timeIntervalSince(firstEventTimestamp)
-            XCTAssert(delay > 2, "received event in \(delay) seconds of previous event, events should be sent at a interval of 2 seconds or more")
+            XCTAssert(delay >= 1, "received event in \(delay) seconds of previous event, events should be sent at a interval of 1 seconds or more")
 
             guard
                 let event = Event(deserialize: secondEventData),

                let response = application(MockConnection(), MockRequest(method: "PUT", path: "/characteristics", body: body))
                XCTAssertEqual(response.status, .noContent)

                wait(for: [expectation], timeout: 2.1)
            }

            let delay = secondEventTimestamp.timeIntervalSince(firstEventTimestamp)
            XCTAssert(delay > 2, "received event in \(delay) seconds of previous event, events should be sent at a interval of 2 seconds or more")
        }
    }


                XCTAssertEqual(response.status, .noContent)
            }

            // if no event within 10ms, the test succeeds
            wait(for: [receiveEvent], timeout: 0.01)
        }
    }

