重新整理 Workers

This commit is contained in:
龙腾猫跃 committed 2026-06-26 09:55:02 +08:00
1 parent 00b49bc3e3
commit 94ef3f8f8e
4 files changed
+54 -28

No files matched your search

+4 -4
View File
@@ -12,7 +12,7 @@ public class WorkerTest : TestBase {
started.Set();
});
worker.Run();
worker.Invoke();
await Assert.That(started.Wait(3000)).IsTrue();
await Assert.That(worker.WaitIfRunning(3000)).IsTrue();
@@ -38,10 +38,10 @@ public class WorkerTest : TestBase {
}
});
worker.Run();
worker.Invoke();
await Assert.That(firstStarted.Wait(3000)).IsTrue();
worker.Run();
worker.Run();
worker.Invoke();
worker.Invoke();
await Assert.That(worker.WaitIfRunning(3000)).IsTrue();
await Assert.That(runCount).IsEqualTo(2);