aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-02-26 20:14:07 +0100
committerGitHub Enterprise <[email protected]>2026-02-26 20:14:07 +0100
commit91885b9fc6b1954d78d14bdf39e2ba91a5aa9f67 (patch)
tree7924a5ccd158258af54936dbb2437ebf527a8131 /xmake.lua
parentMerge pull request #787 from ue-foundation/zs/web-ui-improvements (diff)
downloadzen-91885b9fc6b1954d78d14bdf39e2ba91a5aa9f67.tar.xz
zen-91885b9fc6b1954d78d14bdf39e2ba91a5aa9f67.zip
adding HttpClient tests (#785)
Add comprehensive `HttpClient` test suite. Covers: - **HTTP verbs** -- GET, POST, PUT, DELETE, HEAD dispatch correctly - **GET/POST/PUT/Upload/Download** -- payload round-trips (IoBuffer, CbObject, CompositeBuffer), content types, large payloads, file-spill downloads - **Status codes** -- 2xx/4xx/5xx classification, exact code matching - **Response API** -- IsSuccess, AsText, AsObject, ToText, ErrorMessage, ThrowError - **Error handling** -- connection refused, request timeout, nonexistent endpoints - **Session management** -- default ID, SetSessionId, reset to zero - **Authentication** -- token provider, expired tokens, bearer verification - **Content type detection** -- text, JSON, binary, CbObject - **Request metadata** -- elapsed time, upload/download byte counts - **Retry logic** -- retry after transient 503s, no-retry baseline - **Latency measurement** -- MeasureLatency against live and unreachable servers - **KeyValueMap** -- construction from pairs, string_views, initializer lists - **Transport-level faults (GET)** -- connection reset/close before response, partial headers, truncated body, mid-body reset, stalled response timeout, retry after RST - **Transport-level faults (POST)** -- server reset/close before consuming body, mid-body reset, early 503 without consuming upload, stalled upload timeout, retry with large body after transient failures Also adds zenhttp-test to the xmake test runner (xmake test --run=http).
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake.lua b/xmake.lua
index 3537c618d..d49743cb2 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -344,10 +344,10 @@ task("sln")
task("test")
set_menu {
- usage = "xmake test --run=[core|store|server|integration|all]",
+ usage = "xmake test --run=[core|store|http|server|integration|all]",
description = "Run Zen tests",
options = {
- {'r', "run", "kv", "all", "Run test(s)", " - all", " - core ", " - remotestore", " - store", " - server", " - integration"},
+ {'r', "run", "kv", "all", "Run test(s)", " - all", " - core ", " - remotestore", " - store", " - http", " - server", " - integration"},
{'j', "junit", "k", nil, "Enable junit report output"}
}
}