RedoableWorker 添加更多 API

This commit is contained in:
龙腾猫跃 committed 2026-06-28 08:54:07 +08:00
1 parent 8b26dccd22
commit 93e2f5cde8
2 files changed
+40 -19

No files matched your search

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