From aaeb4bf18c14fe09bf5555fe332f427f5fad2dc7 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Thu, 21 May 2026 00:34:48 +0200 Subject: [PATCH] fix: async test --- test/services/data_transfer_service_test.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/services/data_transfer_service_test.dart b/test/services/data_transfer_service_test.dart index 43e70fb..e88f0ad 100644 --- a/test/services/data_transfer_service_test.dart +++ b/test/services/data_transfer_service_test.dart @@ -925,7 +925,12 @@ void main() { expect(jsonString, isNotEmpty); - final isValid = await DataTransferService.validateJsonSchema(jsonString); + // Schema validation requires real async operations (rootBundle, + // HttpClient within json_schema). These must run via + // tester.runAsync, otherwise the test hangs due to a pending timer. + final isValid = await tester.runAsync( + () => DataTransferService.validateJsonSchema(jsonString), + ); expect(isValid, true); }); });