Skip to content

Fix missing newlines in error JSON propagated from an exit test. #767

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

Merged
merged 2 commits into from
Oct 16, 2024
Merged
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
5 changes: 4 additions & 1 deletion Sources/Testing/ExitTests/ExitTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,10 @@ extension ExitTest {
// Only forward issue-recorded events. (If we start handling other kinds of
// events in the future, we can forward them too.)
let eventHandler = ABIv0.Record.eventHandler(encodeAsJSONLines: true) { json in
try? _backChannelForEntryPoint?.write(json)
_ = try? _backChannelForEntryPoint?.withLock {
try _backChannelForEntryPoint?.write(json)
try _backChannelForEntryPoint?.write("\n")
}
}
configuration.eventHandler = { event, eventContext in
if case .issueRecorded = event.kind {
Expand Down