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 @@ -964,9 +964,14 @@ PerAccountStore store({
964
964
}
965
965
const _store = store;
966
966
967
- UpdateMachine updateMachine ({Account ? account, InitialSnapshot ? initialSnapshot}) {
967
+ UpdateMachine updateMachine ({
968
+ GlobalStore ? globalStore,
969
+ Account ? account,
970
+ InitialSnapshot ? initialSnapshot,
971
+ }) {
968
972
initialSnapshot ?? = _initialSnapshot ();
969
- final store = _store (account: account, initialSnapshot: initialSnapshot);
973
+ final store = _store (globalStore: globalStore,
974
+ account: account, initialSnapshot: initialSnapshot);
970
975
return UpdateMachine .fromInitialSnapshot (
971
976
store: store, initialSnapshot: initialSnapshot);
972
977
}
Original file line number Diff line number Diff line change @@ -972,16 +972,20 @@ void main() {
972
972
973
973
Future <void > prepareReload (FakeAsync async ) async {
974
974
globalStore = LoadingTestGlobalStore (accounts: [eg.selfAccount]);
975
+
976
+ // Simulate the setup that [TestGlobalStore.doLoadPerAccount] would do.
977
+ // (These tests use [LoadingTestGlobalStore] for greater control in
978
+ // later steps; that requires this setup step to be finer-grained too.)
979
+ final updateMachine = eg.updateMachine (
980
+ globalStore: globalStore, account: eg.selfAccount);
981
+ final store = updateMachine.store;
975
982
final future = globalStore.perAccount (eg.selfAccount.id);
976
- final store = eg.store (globalStore: globalStore, account: eg.selfAccount);
977
983
completers ().single.complete (store);
978
984
await future;
979
985
completers ().clear ();
980
- final updateMachine = UpdateMachine .fromInitialSnapshot (
981
- store: store, initialSnapshot: eg.initialSnapshot ());
986
+
982
987
updateMachine.debugPauseLoop ();
983
988
updateMachine.poll ();
984
-
985
989
(store.connection as FakeApiConnection ).prepare (
986
990
apiException: eg.apiExceptionBadEventQueueId ());
987
991
updateMachine.debugAdvanceLoop ();
You can’t perform that action at this time.
0 commit comments