Skip to content

Commit 23c3174

Browse files
committed
store test: Test no error reported for expired queue
1 parent 2f83357 commit 23c3174

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/model/store_test.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,12 @@ void main() {
821821
pollAndFail(async);
822822
check(takeLastReportedError()).isNull();
823823
async.flushTimers();
824+
if (!identical(store, globalStore.perAccountSync(store.accountId))) {
825+
// Store was reloaded.
826+
updateFromGlobalStore();
827+
updateMachine.debugPauseLoop();
828+
updateMachine.poll();
829+
}
824830
}
825831

826832
prepareError();
@@ -838,6 +844,12 @@ void main() {
838844
pollAndFail(async);
839845
check(takeLastReportedError()).isNull();
840846
async.flushTimers();
847+
if (!identical(store, globalStore.perAccountSync(store.accountId))) {
848+
// Store was reloaded.
849+
updateFromGlobalStore();
850+
updateMachine.debugPauseLoop();
851+
updateMachine.poll();
852+
}
841853
}
842854

843855
prepareError();
@@ -863,6 +875,10 @@ void main() {
863875
"Error connecting to Zulip. Retrying…\n"
864876
"Error connecting to Zulip at");
865877
});
878+
879+
test('ignore expired queue', () {
880+
checkNotReported(prepareExpiredEventQueue);
881+
});
866882
});
867883
});
868884

0 commit comments

Comments
 (0)