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({
981
981
}
982
982
const _store = store;
983
983
984
- UpdateMachine updateMachine ({Account ? account, InitialSnapshot ? initialSnapshot}) {
984
+ UpdateMachine updateMachine ({
985
+ GlobalStore ? globalStore,
986
+ Account ? account,
987
+ InitialSnapshot ? initialSnapshot,
988
+ }) {
985
989
initialSnapshot ?? = _initialSnapshot ();
986
- final store = _store (account: account, initialSnapshot: initialSnapshot);
990
+ final store = _store (globalStore: globalStore,
991
+ account: account, initialSnapshot: initialSnapshot);
987
992
return UpdateMachine .fromInitialSnapshot (
988
993
store: store, initialSnapshot: initialSnapshot);
989
994
}
Original file line number Diff line number Diff line change @@ -999,16 +999,20 @@ void main() {
999
999
1000
1000
Future <void > prepareReload (FakeAsync async ) async {
1001
1001
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;
1002
1009
final future = globalStore.perAccount (eg.selfAccount.id);
1003
- final store = eg.store (globalStore: globalStore, account: eg.selfAccount);
1004
1010
completers ().single.complete (store);
1005
1011
await future;
1006
1012
completers ().clear ();
1007
- final updateMachine = UpdateMachine .fromInitialSnapshot (
1008
- store: store, initialSnapshot: eg.initialSnapshot ());
1013
+
1009
1014
updateMachine.debugPauseLoop ();
1010
1015
updateMachine.poll ();
1011
-
1012
1016
(store.connection as FakeApiConnection ).prepare (
1013
1017
apiException: eg.apiExceptionBadEventQueueId ());
1014
1018
updateMachine.debugAdvanceLoop ();
You can’t perform that action at this time.
0 commit comments