Skip to content
Prev Previous commit
loosen approximate assertion
  • Loading branch information
W-A-James committed May 15, 2024
commit 9c83722db5ac29ff5f7b5311e9bb21c3376b3607
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ describe('Monitoring rtt tests', function () {
expect(relevantDurations).to.have.length.gt(0);
const averageDuration =
relevantDurations.reduce((acc, x) => acc + x) / relevantDurations.length;
expect(
client.topology.description.servers.get(server).roundTripTime
).to.be.approximately(averageDuration, 1);
const rtt = client.topology.description.servers.get(server).roundTripTime;
expect(rtt).to.not.equal(0);
expect(rtt).to.be.approximately(averageDuration, 3);
}
}
});
Expand Down