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 @@ -985,9 +985,14 @@ PerAccountStore store({
985
985
}
986
986
const _store = store;
987
987
988
- UpdateMachine updateMachine ({Account ? account, InitialSnapshot ? initialSnapshot}) {
988
+ UpdateMachine updateMachine ({
989
+ GlobalStore ? globalStore,
990
+ Account ? account,
991
+ InitialSnapshot ? initialSnapshot,
992
+ }) {
989
993
initialSnapshot ?? = _initialSnapshot ();
990
- final store = _store (account: account, initialSnapshot: initialSnapshot);
994
+ final store = _store (globalStore: globalStore,
995
+ account: account, initialSnapshot: initialSnapshot);
991
996
return UpdateMachine .fromInitialSnapshot (
992
997
store: store, initialSnapshot: initialSnapshot);
993
998
}
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