Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

use stream.opened instead of stream.connection #66

Merged
merged 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commands/services/tail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const servicesTailCommand =
let writer: WritableStreamDefaultWriter<string | Uint8Array>;

try {
conn = await stream.connection;
conn = await stream.opened;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawn-render I removed the check for stream.connection since it was failing the compile stage. The previous check was unnecessary since the compile stage will bundle the appropriate version of Deno anyway

reader = await conn.readable.getReader();
writer = await conn.writable.getWriter();
} catch (err) {
Expand Down
2 changes: 1 addition & 1 deletion util/find-up.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ Deno.test('findUp', async (t) => {
assertEquals(ret, null);
});

Deno.remove(root, { recursive: true });
await Deno.remove(root, { recursive: true });
Copy link
Contributor Author

@Tadwork Tadwork Dec 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawn-render added this to fix the flaky test runs because otherwise the tests would fail in many cases with

findUp => ./util/find-up.test.ts:10:6
error: Leaking async ops:
  - 1 async operation to op_fs_remove_async was started in this test, but never completed. The operation was started here:
    at handleOpCallTracing (ext:core/01_core.js:610:42)
    at Object.opAsync (ext:core/01_core.js:603:15)
    at Object.remove (ext:deno_fs/30_fs.js:199:14)
    at file:///Users/tzvifriedman/dev/render-cli/util/find-up.test.ts:54:8
    at eventLoopTick (ext:core/01_core.js:183:11)
    at async innerWrapped (ext:cli/40_testing.js:544:5)
    at async asyncOpSanitizer (ext:cli/40_testing.js:193:27)
    at async resourceSanitizer (ext:cli/40_testing.js:426:25)
    at async exitSanitizer (ext:cli/40_testing.js:475:27)
    at async outerWrapped (ext:cli/40_testing.js:489:14)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I was just looking into that too but you beat me to it 😄

});
Loading