MCPcopy Create free account
hub / github.com/deepclause/agentvm / withTimeout

Function withTimeout

test/network/ssl.test.js:13–18  ·  view source on GitHub ↗

* SSL/TLS Connection Tests * * Tests HTTPS connections, TLS handshakes, certificate validation, * and various SSL scenarios within the AgentVM. * * Note: BusyBox wget does not support HTTPS, so we use curl for SSL tests.

(promise, ms = 90000)

Source from the content-addressed store, hash-verified

11 */
12
13function withTimeout(promise, ms = 90000) {
14 return Promise.race([
15 promise,
16 new Promise((_, reject) => setTimeout(() => reject(new Error(`Timeout after ${ms}ms`)), ms))
17 ]);
18}
19
20async function test() {
21 console.log("=== SSL/TLS Connection Tests ===\n");

Callers 1

testFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected