File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -981,9 +981,14 @@ PerAccountStore store({
981981}
982982const _store = store;
983983
984- UpdateMachine updateMachine ({Account ? account, InitialSnapshot ? initialSnapshot}) {
984+ UpdateMachine updateMachine ({
985+ GlobalStore ? globalStore,
986+ Account ? account,
987+ InitialSnapshot ? initialSnapshot,
988+ }) {
985989 initialSnapshot ?? = _initialSnapshot ();
986- final store = _store (account: account, initialSnapshot: initialSnapshot);
990+ final store = _store (globalStore: globalStore,
991+ account: account, initialSnapshot: initialSnapshot);
987992 return UpdateMachine .fromInitialSnapshot (
988993 store: store, initialSnapshot: initialSnapshot);
989994}
Original file line number Diff line number Diff line change @@ -999,16 +999,20 @@ void main() {
999999
10001000 Future <void > prepareReload (FakeAsync async ) async {
10011001 globalStore = LoadingTestGlobalStore (accounts: [eg.selfAccount]);
1002+
1003+ // Simulate the setup that [TestGlobalStore.doLoadPerAccount] would do.
1004+ // (These tests use [LoadingTestGlobalStore] for greater control in
1005+ // later steps; that requires this setup step to be finer-grained too.)
1006+ final updateMachine = eg.updateMachine (
1007+ globalStore: globalStore, account: eg.selfAccount);
1008+ final store = updateMachine.store;
10021009 final future = globalStore.perAccount (eg.selfAccount.id);
1003- final store = eg.store (globalStore: globalStore, account: eg.selfAccount);
10041010 completers ().single.complete (store);
10051011 await future;
10061012 completers ().clear ();
1007- final updateMachine = UpdateMachine .fromInitialSnapshot (
1008- store: store, initialSnapshot: eg.initialSnapshot ());
1013+
10091014 updateMachine.debugPauseLoop ();
10101015 updateMachine.poll ();
1011-
10121016 (store.connection as FakeApiConnection ).prepare (
10131017 apiException: eg.apiExceptionBadEventQueueId ());
10141018 updateMachine.debugAdvanceLoop ();
You can’t perform that action at this time.
0 commit comments