aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver-test/compute-tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenserver-test/compute-tests.cpp')
-rw-r--r--src/zenserver-test/compute-tests.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/zenserver-test/compute-tests.cpp b/src/zenserver-test/compute-tests.cpp
index ce2db366a..a4755adec 100644
--- a/src/zenserver-test/compute-tests.cpp
+++ b/src/zenserver-test/compute-tests.cpp
@@ -698,7 +698,7 @@ TEST_CASE("function.workers")
const IoHash WorkerId = RegisterWorker(Client, TestEnv);
- // GET /workers — the registered worker should appear in the listing
+ // GET /workers - the registered worker should appear in the listing
HttpClient::Response ListResp = Client.Get("/workers"sv);
REQUIRE_MESSAGE(ListResp, "Failed to list workers after registration");
@@ -714,7 +714,7 @@ TEST_CASE("function.workers")
REQUIRE_MESSAGE(WorkerFound, fmt::format("Worker {} not found in worker listing", WorkerId.ToHexString()));
- // GET /workers/{worker} — descriptor should match what was registered
+ // GET /workers/{worker} - descriptor should match what was registered
const std::string WorkerUrl = fmt::format("/workers/{}", WorkerId.ToHexString());
HttpClient::Response DescResp = Client.Get(WorkerUrl);
REQUIRE_MESSAGE(DescResp, fmt::format("Failed to get worker descriptor: status={}", DescResp.StatusCode));
@@ -743,7 +743,7 @@ TEST_CASE("function.workers")
CHECK_MESSAGE(Rot13Found, "Rot13 function not found in worker descriptor");
CHECK_MESSAGE(SleepFound, "Sleep function not found in worker descriptor");
- // GET /workers/{unknown} — should return 404
+ // GET /workers/{unknown} - should return 404
const std::string UnknownUrl = fmt::format("/workers/{}", IoHash::Zero.ToHexString());
HttpClient::Response NotFoundResp = Client.Get(UnknownUrl);
CHECK_EQ(NotFoundResp.StatusCode, HttpResponseCode::NotFound);
@@ -874,7 +874,7 @@ TEST_CASE("function.queues.remote")
const IoHash WorkerId = RegisterWorker(Client, TestEnv);
- // Create a remote queue — response includes both an integer queue_id and an OID queue_token
+ // Create a remote queue - response includes both an integer queue_id and an OID queue_token
HttpClient::Response CreateResp = Client.Post("/queues/remote"sv);
REQUIRE_MESSAGE(CreateResp,
fmt::format("Remote queue creation failed: status={}, body={}", CreateResp.StatusCode, CreateResp.ToText()));
@@ -1114,7 +1114,7 @@ TEST_CASE("function.priority")
REQUIRE_MESSAGE(LowResp3, "Low-priority job 3 submission failed");
const int LsnLow3 = LowResp3.AsObject()["lsn"sv].AsInt32();
- // Submit 1 high-priority Rot13 job — should execute before the low-priority ones
+ // Submit 1 high-priority Rot13 job - should execute before the low-priority ones
const std::string HighJobUrl = fmt::format("/queues/{}/jobs/{}?priority=10", QueueId, WorkerId.ToHexString());
HttpClient::Response HighResp = Client.Post(HighJobUrl, BuildRot13ActionPackage("high"sv));
REQUIRE_MESSAGE(HighResp, "High-priority job submission failed");
@@ -1699,7 +1699,7 @@ TEST_CASE("function.remote.late_runner_discovery")
}
REQUIRE_MESSAGE(WorkerFound,
- fmt::format("Worker not found on W2 after discovery — SyncWorkersToRunner may have failed\nW2 log:\n{}",
+ fmt::format("Worker not found on W2 after discovery - SyncWorkersToRunner may have failed\nW2 log:\n{}",
Instance2.GetLogOutput()));
}
@@ -1851,7 +1851,7 @@ TEST_CASE("function.remote.queue_cancel_propagation")
// Wait for the action to start running on the remote
WaitForActionRunning(Session);
- // Cancel the local queue — this should propagate to the remote
+ // Cancel the local queue - this should propagate to the remote
Session.CancelQueue(QueueId);
// Poll for the action to complete (as cancelled)
@@ -1975,7 +1975,7 @@ TEST_CASE("function.session.abandon_pending" * doctest::skip())
CbPackage WorkerPackage = BuildWorkerPackage(TestEnv, Resolver);
Session.RegisterWorker(WorkerPackage);
- // Enqueue several actions — they will stay pending because there are no runners
+ // Enqueue several actions - they will stay pending because there are no runners
auto QueueResult = Session.CreateQueue();
REQUIRE_MESSAGE(QueueResult.QueueId != 0, "Failed to create queue");
@@ -1988,7 +1988,7 @@ TEST_CASE("function.session.abandon_pending" * doctest::skip())
REQUIRE_MESSAGE(Enqueue2, "Failed to enqueue action 2");
REQUIRE_MESSAGE(Enqueue3, "Failed to enqueue action 3");
- // Transition to Abandoned — should mark all pending actions as Abandoned
+ // Transition to Abandoned - should mark all pending actions as Abandoned
bool Transitioned = Session.Abandon();
CHECK_MESSAGE(Transitioned, "Failed to transition to Abandoned");
CHECK(Session.GetSessionState() == zen::compute::ComputeServiceSession::SessionState::Abandoned);
@@ -2024,7 +2024,7 @@ TEST_CASE("function.session.abandon_pending" * doctest::skip())
auto Rejected = Session.EnqueueActionToQueue(QueueResult.QueueId, ActionObj, 0);
CHECK_MESSAGE(!Rejected, "Expected action submission to be rejected in Abandoned state");
- // Abandoned → Sunset should be valid
+ // Abandoned -> Sunset should be valid
CHECK(Session.RequestStateTransition(zen::compute::ComputeServiceSession::SessionState::Sunset));
Session.Shutdown();
@@ -2067,7 +2067,7 @@ TEST_CASE("function.session.abandon_running")
// Wait for the action to start running on the remote
WaitForActionRunning(Session);
- // Transition to Abandoned — should abandon the running action
+ // Transition to Abandoned - should abandon the running action
bool Transitioned = Session.Abandon();
CHECK_MESSAGE(Transitioned, "Failed to transition to Abandoned");
CHECK(!Session.IsHealthy());
@@ -2137,7 +2137,7 @@ TEST_CASE("function.remote.abandon_propagation")
// Wait for the action to start running on the remote
WaitForActionRunning(Session);
- // Transition to Abandoned — should abandon the running action and propagate
+ // Transition to Abandoned - should abandon the running action and propagate
bool Transitioned = Session.Abandon();
CHECK_MESSAGE(Transitioned, "Failed to transition to Abandoned");
@@ -2227,7 +2227,7 @@ TEST_CASE("function.remote.shutdown_cancels_queues")
REQUIRE_MESSAGE(RemoteQueueFound, "Expected remote queue to exist before shutdown");
}
- // Shut down the session — this should cancel all remote queues
+ // Shut down the session - this should cancel all remote queues
Session.Shutdown();
// Verify the remote queue is now cancelled
@@ -2296,7 +2296,7 @@ TEST_CASE("function.remote.shutdown_rejects_new_work")
CHECK_EQ(GetRot13Output(ResultPackage), "Uryyb Jbeyq"sv);
}
- // Shut down — the remote runner should now reject new work
+ // Shut down - the remote runner should now reject new work
Session.Shutdown();
// Attempting to enqueue after shutdown should fail (session is in Sunset state)
@@ -2386,7 +2386,7 @@ TEST_CASE("function.session.retract_not_terminal")
REQUIRE_MESSAGE(Code == HttpResponseCode::OK, "Action did not complete within timeout");
- // Retract should fail — action already completed (no longer in pending/running maps)
+ // Retract should fail - action already completed (no longer in pending/running maps)
auto RetractResult = Session.RetractAction(Enqueued.Lsn);
CHECK(!RetractResult.Success);
@@ -2412,7 +2412,7 @@ TEST_CASE("function.retract_http")
HttpClient::Response BlockerResp = Client.Post(BlockerUrl, BuildSleepActionPackage("data"sv, 30'000));
REQUIRE_MESSAGE(BlockerResp, fmt::format("Blocker submission failed: status={}", BlockerResp.StatusCode));
- // Submit a second action — it will stay pending because the slot is occupied
+ // Submit a second action - it will stay pending because the slot is occupied
HttpClient::Response SubmitResp = Client.Post(BlockerUrl, BuildRot13ActionPackage("Retract HTTP Test"sv));
REQUIRE_MESSAGE(SubmitResp, fmt::format("Job submission failed: status={}", SubmitResp.StatusCode));
@@ -2464,13 +2464,13 @@ TEST_CASE("function.session.immediate_query_after_enqueue")
auto EnqueueRes = Session.EnqueueAction(ActionObj, 0);
REQUIRE_MESSAGE(EnqueueRes, "Failed to enqueue action");
- // Query by LSN immediately — must not return NotFound
+ // Query by LSN immediately - must not return NotFound
CbPackage Result;
HttpResponseCode Code = Session.GetActionResult(EnqueueRes.Lsn, Result);
CHECK_MESSAGE(Code == HttpResponseCode::Accepted,
fmt::format("GetActionResult returned {} immediately after enqueue, expected Accepted", Code));
- // Query by ActionId immediately — must not return NotFound
+ // Query by ActionId immediately - must not return NotFound
const IoHash ActionId = ActionObj.GetHash();
CbPackage FindResult;
HttpResponseCode FindCode = Session.FindActionResult(ActionId, FindResult);