patch json request test

This commit is contained in:
sneurlax 2024-01-26 15:59:18 -06:00
parent 3c8e220303
commit 0ff37d1e3e

View file

@ -55,11 +55,13 @@ void main() {
const jsonRequestString = const jsonRequestString =
'{"jsonrpc": "2.0", "id": "some id","method": "server.ping","params": []}'; '{"jsonrpc": "2.0", "id": "some id","method": "server.ping","params": []}';
expect( await expectLater(
() => jsonRPC.request( jsonRPC.request(
jsonRequestString, jsonRequestString,
const Duration(seconds: 1), const Duration(seconds: 1),
), ),
throwsA(isA<SocketException>())); throwsA(isA<Exception>()
.having((e) => e.toString(), 'message', contains("Request timeout"))),
);
}); });
} }