From ac214a023e3d823a8231c365656cfa27703f27d5 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 13:13:44 +0000 Subject: enstate: reactions after applying, and after a switch After applying, units are restarted or reloaded, and started if they aren't running: they may have failed for want of their views. That happens with the store's lock released: a unit restarted may want the one that runs --migrate, which waits for the lock. After a switch, --migrate runs from the unit that units using views are ordered after, so only running units react, without waiting for them (--no-block try-restart, try-reload-or-restart). --- tests/migrations.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/migrations.rs') diff --git a/tests/migrations.rs b/tests/migrations.rs index 7b78b8e..b91972c 100644 --- a/tests/migrations.rs +++ b/tests/migrations.rs @@ -61,7 +61,10 @@ fn a_renamed_slot_and_a_rollback() { ); assert_eq!(host.view("retiolum.key", "retiolum.key").unwrap(), b"K"); assert!(host.view("tinc.key", "tinc.key").is_none()); - assert!(host.reactions().contains("restart tincr.service")); + assert!( + host.reactions() + .contains("--no-block try-restart tincr.service") + ); let stored = host.store().current("secrets").unwrap().unwrap(); assert_eq!(stored.id, first); assert_eq!(stored.schema, s1.1); -- cgit v1.3.1