test(FN-4907): cover stale settings invalidation and sync refresh paths
Fusion-Task-Id: FN-4907 Fusion-Task-Lineage: e84d5357-0719-4cc7-ab3f-f665ac83b218
This commit is contained in:
committed by
gsxdsm
parent
4416de159c
commit
a2bd876eb4
@@ -573,6 +573,7 @@ vi.mock("@fusion/engine", async (importOriginal) => {
|
||||
PeerExchangeService: vi.fn().mockImplementation(() => ({
|
||||
start: vi.fn(),
|
||||
stop: vi.fn().mockResolvedValue(undefined),
|
||||
updateGlobalSettings: vi.fn(),
|
||||
})),
|
||||
TriageProcessor: mocks.triageCtor,
|
||||
TaskExecutor: mocks.executorCtor,
|
||||
|
||||
@@ -715,6 +715,7 @@ vi.mock("@fusion/engine", async (importOriginal) => {
|
||||
PeerExchangeService: vi.fn().mockImplementation(() => ({
|
||||
start: vi.fn(),
|
||||
stop: vi.fn().mockResolvedValue(undefined),
|
||||
updateGlobalSettings: vi.fn(),
|
||||
})),
|
||||
shouldUseHybridExecutor: mockShouldUseHybridExecutor,
|
||||
HybridExecutor: mockHybridExecutorCtor,
|
||||
@@ -2626,6 +2627,7 @@ describe("runDashboard — mesh lifecycle ownership", () => {
|
||||
expect(peerExchangeCtor.mock.calls.length).toBeGreaterThan(baselineCalls);
|
||||
const peerExchangeInstance = peerExchangeCtor.mock.results.at(-1)?.value;
|
||||
expect(peerExchangeInstance.start).toHaveBeenCalledTimes(1);
|
||||
expect(peerExchangeInstance.updateGlobalSettings).toHaveBeenCalledTimes(1);
|
||||
expect(startDiscovery).toHaveBeenCalledWith(expect.objectContaining({
|
||||
broadcast: true,
|
||||
listen: true,
|
||||
|
||||
Reference in New Issue
Block a user