From 38096d1589f6e434a77bb188962db2f7b40ca84b Mon Sep 17 00:00:00 2001 From: xmanrui <841206367@qq.com> Date: Mon, 31 Aug 2026 20:30:48 +0800 Subject: [PATCH] test: wait for update service shutdown before restart --- test/update-service.test.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/update-service.test.mjs b/test/update-service.test.mjs index 28fa5d0..db26c89 100644 --- a/test/update-service.test.mjs +++ b/test/update-service.test.mjs @@ -167,6 +167,7 @@ test('installation pins the confirmed version, verifies disk and waits for a man assert.equal(finished.installedVersion, '3.0.8'); assert.equal(finished.blockedReason, 'pending-restart'); assert.equal(finished.canInstall, false); + await f.service.close(); const restarted = await f.restart().status(); assert.equal(restarted.job.state, 'completed'); assert.equal(restarted.runningVersion, '3.0.8'); @@ -270,6 +271,7 @@ test('an external version change after installation is not reported as this job const f = await fixture(t); await f.submit(); await waitForJob(f.service, 'restart-required'); + await f.service.close(); f.environment.installedVersion = '3.0.9'; const result = await f.restart('3.0.9').status(); assert.equal(result.job.state, 'interrupted');