Step 4
This commit is contained in:
@@ -311,8 +311,18 @@ void TestRuntimeCoordinatorPersistenceEvents()
|
||||
Expect(countEvents(overlayEvents, RuntimeEventType::OscOverlayApplied) == 1, "transient OSC overlay is observable");
|
||||
Expect(countEvents(overlayEvents, RuntimeEventType::RuntimePersistenceRequested) == 0, "transient OSC overlay does not request persistence");
|
||||
|
||||
expectAcceptedPersistence(coordinator.CommitOscParameterByControlKey("alpha", "gain", JsonValue(0.2)), "CommitOscParameterByControlKey",
|
||||
"accepted OSC commit is persistent");
|
||||
RuntimeCoordinatorResult oscCommitResult = coordinator.CommitOscParameterByControlKey("alpha", "gain", JsonValue(0.2));
|
||||
std::vector<RuntimeEvent> oscCommitEvents = dispatchAndClear();
|
||||
Expect(oscCommitResult.accepted, "accepted OSC commit updates committed session state");
|
||||
Expect(!oscCommitResult.persistenceRequested, "settled OSC commit does not request persistence by default");
|
||||
Expect(countEvents(oscCommitEvents, RuntimeEventType::RuntimeMutationAccepted) == 1, "settled OSC commit publishes accepted fact");
|
||||
Expect(countEvents(oscCommitEvents, RuntimeEventType::RuntimeStateChanged) == 1, "settled OSC commit publishes state change");
|
||||
Expect(countEvents(oscCommitEvents, RuntimeEventType::RuntimePersistenceRequested) == 0, "settled OSC commit publishes no persistence request");
|
||||
RuntimeStore::StoredParameterSnapshot oscCommitSnapshot;
|
||||
Expect(store.TryGetStoredParameterByControlKey("alpha", "gain", oscCommitSnapshot, error), "settled OSC commit can be read back");
|
||||
Expect(!oscCommitSnapshot.currentValue.numberValues.empty() &&
|
||||
oscCommitSnapshot.currentValue.numberValues[0] == 0.2,
|
||||
"settled OSC commit updates the committed session value");
|
||||
}
|
||||
|
||||
std::filesystem::remove_all(root);
|
||||
|
||||
Reference in New Issue
Block a user