Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mock-connection): use muxer to close/abort streams #2769

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 2 additions & 6 deletions packages/interface-compliance-tests/src/mocks/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,15 @@

async close (options?: AbortOptions): Promise<void> {
this.status = 'closing'
await Promise.all(
this.streams.map(async s => s.close(options))
)
await this.muxer.close()
await this.maConn.close()
this.status = 'closed'
this.timeline.close = Date.now()
}

abort (err: Error): void {
this.status = 'closing'
this.streams.forEach(s => {
s.abort(err)
})
this.muxer.abort(err)

Check warning on line 111 in packages/interface-compliance-tests/src/mocks/connection.ts

View check run for this annotation

Codecov / codecov/patch

packages/interface-compliance-tests/src/mocks/connection.ts#L111

Added line #L111 was not covered by tests
this.maConn.abort(err)
this.status = 'closed'
this.timeline.close = Date.now()
Expand Down
Loading