resetDreamicBootstrapIdempotencyForTest function

  1. @visibleForTesting
void resetDreamicBootstrapIdempotencyForTest()

Resets the dreamic-core bootstrap idempotency apply-once flags between test cases (Issue 63/87). Module-level statics persist across cases in one VM, so without this the "fresh-run applies / re-run skips" assertions become order-dependent.

Resets ONLY the dreamic-core-owned flags:

  • the Firebase emulator-connect flag (_emulatorConnected, Issue 32),
  • the isolate error-listener flag (Issue 31).

Not MPP's _firestoreSettingsApplied — that lives in MPP's afterFirebaseInit hook (MPP-owned) and is reset MPP-side (Issue 87). Also clears the static cache backing DreamicServices.initialize's "already-initialized" early-return (Issue 75 / Issue 47) so the re-entrancy test (clean success → later-step failure → retry early-returns the cache) is order-independent.

Call from the idempotency tests' setUp() alongside GetIt.reset().

Implementation

@visibleForTesting
void resetDreamicBootstrapIdempotencyForTest() {
  resetEmulatorConnectedFlag();
  resetIsolateErrorListenerFlag();
  DreamicServices.resetDreamicServicesInitializedForTest();
}