

























@@ -448,7 +448,7 @@ describe("gateway bonjour advertiser", () => {
448448449449// watchdog first retries, then recreates the advertiser after the service
450450// stays unhealthy across multiple 5s ticks.
451-await vi.advanceTimersByTimeAsync(15_000);
451+await vi.advanceTimersByTimeAsync(25_000);
452452expect(advertise).toHaveBeenCalledTimes(3);
453453expect(createService).toHaveBeenCalledTimes(2);
454454@@ -605,7 +605,7 @@ describe("gateway bonjour advertiser", () => {
605605expect(registerUncaughtExceptionHandler).toHaveBeenCalledTimes(1);
606606expect(registerUnhandledRejectionHandler).toHaveBeenCalledTimes(1);
607607608-await vi.advanceTimersByTimeAsync(15_000);
608+await vi.advanceTimersByTimeAsync(25_000);
609609610610expect(logger.warn).toHaveBeenCalledWith(expect.stringContaining("restarting advertiser"));
611611expect(createService).toHaveBeenCalledTimes(2);
@@ -650,7 +650,7 @@ describe("gateway bonjour advertiser", () => {
650650expect(createService).toHaveBeenCalledTimes(1);
651651expect(advertise).toHaveBeenCalledTimes(1);
652652653-await vi.advanceTimersByTimeAsync(15_000);
653+await vi.advanceTimersByTimeAsync(25_000);
654654655655expect(logger.warn).toHaveBeenCalledWith(
656656expect.stringContaining("service stuck in announcing"),
@@ -678,7 +678,7 @@ describe("gateway bonjour advertiser", () => {
678678sshPort: 2222,
679679});
680680681-await vi.advanceTimersByTimeAsync(65_000);
681+await vi.advanceTimersByTimeAsync(105_000);
682682683683expect(logger.warn).toHaveBeenCalledWith(
684684expect.stringContaining("disabling advertiser after 3 failed restarts"),
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。