Skip to content

Commit

Permalink
feat: Update timeouts in smoke_test.dart to improve RPC testing
Browse files Browse the repository at this point in the history
This commit updates the timeouts in the smoke_test.dart file to improve RPC testing. The previous timeouts were [1000, 100, 10, 100, 0], and they have been changed to [200, 50, 10, 25, 0]. This change ensures that the RPC requests are sent and received within the specified time intervals, enhancing the reliability and performance of the RPC functionality.
  • Loading branch information
PlugFox committed Jul 20, 2024
1 parent 03a6cac commit 65de031
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/smoke/smoke_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void main() {
final client = $createClient();
await client.connect($url);
expect(client.state, isA<SpinifyState$Connected>());
final timeouts = <int>[1000, 100, 10, 100, 0];
final timeouts = <int>[200, 50, 10, 25, 0];
final futures = <Future<List<int>>>[
for (final timeout in timeouts)
client.rpc('timeout', utf8.encode(timeout.toString())),
Expand All @@ -152,11 +152,11 @@ void main() {
]));
await expectLater(
Future.wait(futures),
completion(
equals([
for (final timeout in timeouts) utf8.encode(timeout.toString()),
]),
));
completion(equals(timeouts
.map((t) => t.toString())
.map(utf8.encode)
.map(equals)
.toList(growable: false))));
await client.close();
expect(client.state, isA<SpinifyState$Closed>());
});
Expand Down

0 comments on commit 65de031

Please sign in to comment.