summaryrefslogtreecommitdiff
path: root/cli/tests/unit/net_test.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-06-10 11:26:28 -0400
committerGitHub <noreply@github.com>2020-06-10 11:26:28 -0400
commit54c3f8e27fa1f38a3e2d65c2b297c415062d01c8 (patch)
treef4308d91a6412a79ce9aced69c6465ba948822cf /cli/tests/unit/net_test.ts
parentd9c6b109dfc9d6e31373f7001d9a0da50868772c (diff)
fix udp BorrowMutError (#6221)
Diffstat (limited to 'cli/tests/unit/net_test.ts')
-rw-r--r--cli/tests/unit/net_test.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/cli/tests/unit/net_test.ts b/cli/tests/unit/net_test.ts
index 4fd253a6c..cda5a536e 100644
--- a/cli/tests/unit/net_test.ts
+++ b/cli/tests/unit/net_test.ts
@@ -255,6 +255,21 @@ unitTest(
);
unitTest(
+ { ignore: Deno.build.os === "windows", perms: { net: true } },
+ async function netUdpBorrowMutError(): Promise<void> {
+ const socket = Deno.listenDatagram({
+ port: 4501,
+ transport: "udp",
+ });
+ // Panic happened on second send: BorrowMutError
+ const a = socket.send(new Uint8Array(), socket.addr);
+ const b = socket.send(new Uint8Array(), socket.addr);
+ await Promise.all([a, b]);
+ socket.close();
+ }
+);
+
+unitTest(
{ ignore: Deno.build.os === "windows", perms: { read: true, write: true } },
async function netUnixPacketSendReceive(): Promise<void> {
const filePath = await Deno.makeTempFile();