This commit is contained in:
root
2026-06-15 21:42:50 +00:00
parent 34a97e2577
commit 99cd92fb4a
126 changed files with 1615 additions and 1057 deletions
+13
View File
@@ -260,6 +260,16 @@ void cli_run_starter_parity()
cli_expect_http("uce_starter_parity:starter unknown route 404", "/examples/uce-starter/index.uce?does-not-exist", 404, "<title>404 Not Found | UCE Starter</title>", cli_demo_error_markers());
}
void cli_run_task_lifetime_smoke()
{
String late_file = "/tmp/uce-site-tests-late-task.txt";
file_unlink(late_file);
CliHttpResponse res = cli_frontend("/tests/tasks.uce?mode=late");
usleep(3000000);
String observed = file_exists(late_file) ? file_get_contents(late_file) : "";
cli_test_case("uce_task_lifetime:delayed callback after request return", res.status == 200 && cli_contains(res.body, "late task scheduled") && cli_contains(observed, "late callback ran"), "status=" + std::to_string(res.status) + " observed=" + cli_truncate(observed));
}
void cli_run_tcp_smoke()
{
u64 fd80 = socket_connect("127.0.0.1", 80);
@@ -321,6 +331,9 @@ CLI(Request& context)
cli_run_security_smoke();
print("[GROUP] security ", std::to_string((u64)((time_precise() - group_start) * 1000)), " ms\n");
group_start = time_precise();
cli_run_task_lifetime_smoke();
print("[GROUP] task-lifetime ", std::to_string((u64)((time_precise() - group_start) * 1000)), " ms\n");
group_start = time_precise();
cli_run_starter_parity();
print("[GROUP] starter ", std::to_string((u64)((time_precise() - group_start) * 1000)), " ms\n");
group_start = time_precise();