Skip to content

Commit f286402

Browse files
committed
test(harness): widen cancel-return wait for loaded CI runners
The cancel assertion holds the recorder monitor and only fails on a real storage block; a 5s wall-clock wait also tripped when the canceller thread was scheduled late on a saturated ubuntu runner.
1 parent cb769dc commit f286402

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎agentscope-harness/src/test/java/io/agentscope/harness/agent/HarnessAgentTest.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,11 @@ public Mono<String> onSystemPrompt(
824824
// must keep run.cancel() free of recorder storage interactions.
825825
synchronized (recorder) {
826826
canceller.start();
827+
// Generous wait: on loaded CI runners the canceller thread itself may be
828+
// scheduled late; a real recorder-storage block would never return because
829+
// the monitor stays held until the assertions below run.
827830
assertTrue(
828-
awaitLatch(cancelReturned),
831+
cancelReturned.await(30, TimeUnit.SECONDS),
829832
"run.cancel() blocked on recorder storage interactions");
830833
// The cancel walk is parked on the held monitor (or about to park): the start
831834
// is durable, the end cannot have been written yet.

0 commit comments

Comments
 (0)