From 0ff37d1e3e161c2ca150fb43c7f397806e355d67 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Fri, 26 Jan 2024 15:59:18 -0600 Subject: [PATCH] patch json request test --- test/json_rpc_test.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/json_rpc_test.dart b/test/json_rpc_test.dart index b5df1d52f..e9da77971 100644 --- a/test/json_rpc_test.dart +++ b/test/json_rpc_test.dart @@ -55,11 +55,13 @@ void main() { const jsonRequestString = '{"jsonrpc": "2.0", "id": "some id","method": "server.ping","params": []}'; - expect( - () => jsonRPC.request( - jsonRequestString, - const Duration(seconds: 1), - ), - throwsA(isA())); + await expectLater( + jsonRPC.request( + jsonRequestString, + const Duration(seconds: 1), + ), + throwsA(isA() + .having((e) => e.toString(), 'message', contains("Request timeout"))), + ); }); }