Skip to content

Commit

Permalink
snapshot support default to 1 hour (instead of 10 s)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Jan 13, 2025
1 parent a3aa79f commit ae81784
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions firestore_test/lib/firestore_track_changes_support_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,20 @@ void runFirestoreTrackChangesSupportTests(
var testsRef = getTestsRef();
var docRef = testsRef.doc('two_onSnapshotSupport');
await docRef.delete();
var pullOptions1 =
TrackChangesPullOptions(refreshDelay: Duration(milliseconds: 200));

var completer1 = Completer<void>();
var completer2 = Completer<void>();
var subscription1 = docRef.onSnapshotSupport().listen((event) {
var subscription1 =
docRef.onSnapshotSupport(options: pullOptions1).listen((event) {
print('event1 $event');
if (event.exists) {
completer1.complete();
}
});
var subscription2 = docRef.onSnapshotSupport().listen((event) {
var subscription2 =
docRef.onSnapshotSupport(options: pullOptions1).listen((event) {
print('event2 $event');
if (event.exists) {
completer2.complete();
Expand Down

0 comments on commit ae81784

Please sign in to comment.