fleetd #726 unit 2: scope the member-daemon assertion to the roll itself
The assembled daemon's own boot-time orphan-worker reap makes a real call on the member fake before any roll starts. Clear the member fake's recorded calls once assembly finishes and before the roll begins, so the assertion measures calls made since the roll started rather than the whole process's lifetime, and reword its message to say so.
This commit is contained in:
@@ -242,6 +242,11 @@ class FleetdLeadRolloverAssemblyTest {
|
||||
+ "Fleetd.leadRollover(...) call site — a mutation to `LeadRollover leadRollover = "
|
||||
+ "null;` at that call site can never pass this");
|
||||
|
||||
// assembleAndStart's own boot work (the orphan-worker reap) makes a real call on the
|
||||
// member daemon before the roll ever starts. Clear it here so the assertion below measures
|
||||
// only what the roll itself does, not what daemon startup does.
|
||||
member.calls.clear();
|
||||
|
||||
LeadRollover.PendingRollover pending = rollover.open("term_a", "fleetd #612 B3 test");
|
||||
String expectedHandoverPath = leadCwd.resolve("handover.md").normalize().toString();
|
||||
assertEquals(expectedHandoverPath, pending.handoverPath());
|
||||
@@ -291,7 +296,8 @@ class FleetdLeadRolloverAssemblyTest {
|
||||
// the pane.close call above onto `member` instead, which this assertion catches — the thing
|
||||
// the single-fake version of this test could never see, because both wrapped the same client.
|
||||
assertTrue(member.calls.isEmpty(), "the roll must be wired to the LEAD daemon only — got "
|
||||
+ member.calls.size() + " call(s) on the MEMBER daemon instead: " + member.calls);
|
||||
+ member.calls.size() + " call(s) recorded on the MEMBER daemon since the roll began: "
|
||||
+ member.calls);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user