Skip to content

Commit

Permalink
Release 10.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shamblett committed Aug 6, 2024
1 parent c500de7 commit c50e39e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/mqtt_client_keep_alive_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -265,20 +265,20 @@ void main() {
final pingMessageRx = MqttPingResponseMessage();
ka.pingResponseReceived(pingMessageRx);
latencies[0] = ka.lastCycleLatency;
expect(ka.lastCycleLatency > 1000, isTrue);
expect(ka.averageCycleLatency > 1000, isTrue);
expect(ka.lastCycleLatency > 0, isTrue);
expect(ka.averageCycleLatency > 0, isTrue);
await MqttUtilities.asyncSleep(3);
verify(() => ch.sendMessage(any())).called(1);
ka.pingResponseReceived(pingMessageRx);
latencies[1] = ka.lastCycleLatency;
expect(ka.lastCycleLatency > 1000, isTrue);
expect(ka.averageCycleLatency > 1000, isTrue);
expect(ka.lastCycleLatency > 0, isTrue);
expect(ka.averageCycleLatency > 0, isTrue);
await MqttUtilities.asyncSleep(3);
verify(() => ch.sendMessage(any())).called(1);
ka.pingResponseReceived(pingMessageRx);
latencies[2] = ka.lastCycleLatency;
expect(ka.lastCycleLatency > 1000, isTrue);
expect(ka.averageCycleLatency > 1000, isTrue);
expect(ka.lastCycleLatency > 0, isTrue);
expect(ka.averageCycleLatency > 0, isTrue);
expect(ka.averageCycleLatency,
(latencies[0] + latencies[1] + latencies[2]) ~/ 3);
expect(disconnect, isFalse);
Expand Down

0 comments on commit c50e39e

Please sign in to comment.