@jskit-ai/http-runtime 0.1.229 → 0.1.232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/test/client.test.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/http-runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.232",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test --test-concurrency=1"
|
|
@@ -78,6 +78,6 @@
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@jskit-ai/kernel": "0.1.
|
|
81
|
+
"@jskit-ai/kernel": "0.1.234"
|
|
82
82
|
}
|
|
83
83
|
}
|
package/test/client.test.js
CHANGED
|
@@ -48,7 +48,7 @@ test("ordinary reads get a finite default deadline while streams keep their expl
|
|
|
48
48
|
});
|
|
49
49
|
|
|
50
50
|
for (const phase of ["headers", "body", "CSRF session"]) {
|
|
51
|
-
test(`read deadline closes a real HTTP connection stalled during ${phase}`, async (t) => {
|
|
51
|
+
test(`read deadline closes a real HTTP connection stalled during ${phase}`, { timeout: 5000 }, async (t) => {
|
|
52
52
|
let received;
|
|
53
53
|
let closed;
|
|
54
54
|
const requestReceived = new Promise((resolve) => { received = resolve; });
|
|
@@ -72,7 +72,7 @@ for (const phase of ["headers", "body", "CSRF session"]) {
|
|
|
72
72
|
? { method: "POST", body: { value: 1 } }
|
|
73
73
|
: {});
|
|
74
74
|
const rejected = assert.rejects(pending, (error) => error.name === "TimeoutError");
|
|
75
|
-
await requestReceived;
|
|
75
|
+
await Promise.race([requestReceived, pending]);
|
|
76
76
|
await rejected;
|
|
77
77
|
await responseClosed;
|
|
78
78
|
});
|