diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-07-13 15:49:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 15:49:20 -0400 |
commit | 5273259eef712a04224c8a3db96d3dc824e7bb86 (patch) | |
tree | 5d0c99959cf511be2ce5f9f33d2453a2d58d2167 /cli/tests/unit/files_test.ts | |
parent | c2770c70b72e5d5121be936ee32e249a21e4ea92 (diff) |
chore: remove flaky writeSyncWhileAsyncFails test (#15194)
Diffstat (limited to 'cli/tests/unit/files_test.ts')
-rw-r--r-- | cli/tests/unit/files_test.ts | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/cli/tests/unit/files_test.ts b/cli/tests/unit/files_test.ts index 5fb590d72..d15f1f538 100644 --- a/cli/tests/unit/files_test.ts +++ b/cli/tests/unit/files_test.ts @@ -263,38 +263,6 @@ Deno.test( }, ); -Deno.test( - { permissions: { write: true } }, - async function writeSyncWhileAsyncFails() { - const tempDir = await Deno.makeTempDir(); - try { - const filePath = tempDir + "/file.txt"; - const file = await Deno.open(filePath, { create: true, write: true }); - const rid = file.rid; - try { - // set a file lock so the async write will be held up - await Deno.flock(rid, true); - let p: Promise<number> | undefined; - try { - p = Deno.write(rid, new TextEncoder().encode("test")); - assertThrows( - () => Deno.writeSync(rid, new TextEncoder().encode("test")), - Error, - "Resource is unavailable because it is in use by a promise", - ); - } finally { - await Deno.funlock(rid); - } - await p; - } finally { - file.close(); - } - } finally { - Deno.removeSync(tempDir, { recursive: true }); - } - }, -); - Deno.test(async function openOptions() { const filename = "cli/tests/testdata/fixture.json"; await assertRejects( |