Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
node-undici /
best-practices /
Delete
Unzip
Name
Size
Permission
Date
Action
client-certificate.md
1.99
KB
-rw-r--r--
2023-10-11 19:12
mocking-request.md
3.26
KB
-rw-r--r--
2023-10-11 19:12
proxy.md
3.23
KB
-rw-r--r--
2023-10-11 19:12
writing-tests.md
648
B
-rw-r--r--
2023-10-11 19:12
Save
Rename
# Writing tests Undici is tuned for a production use case and its default will keep a socket open for a few seconds after an HTTP request is completed to remove the overhead of opening up a new socket. These settings that makes Undici shine in production are not a good fit for using Undici in automated tests, as it will result in longer execution times. The following are good defaults that will keep the socket open for only 10ms: ```js import { request, setGlobalDispatcher, Agent } from 'undici' const agent = new Agent({ keepAliveTimeout: 10, // milliseconds keepAliveMaxTimeout: 10 // milliseconds }) setGlobalDispatcher(agent) ```