diff --git a/flutter_client/test/cache/cache_first_test.dart b/flutter_client/test/cache/cache_first_test.dart index f98f7db9..9f99e2be 100644 --- a/flutter_client/test/cache/cache_first_test.dart +++ b/flutter_client/test/cache/cache_first_test.dart @@ -32,9 +32,12 @@ void main() { isOnline: () async => true, ); - final firstFuture = results.first; - controller.add([]); - expect(await firstFuture, 42); + // Post-coldFetchAttempted guard, cacheFirst yields the current + // (still-empty) rows after the fetch returns, so the stream + // never hangs when populate is a no-op for this filter. The + // simulated drift re-emit then yields the populated rows. + final emissions = await results.take(2).toList(); + expect(emissions, [0, 42]); expect(fetchCalled, 1); await controller.close(); });