Skip to content

Commit 751ea94

Browse files
authored
Fix missing newlines in error JSON propagated from an exit test. (#767)
We weren't emitting newlines between exit test backchannel JSON blobs. Oops. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 1395add commit 751ea94

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/Testing/ExitTests/ExitTest.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,10 @@ extension ExitTest {
310310
// Only forward issue-recorded events. (If we start handling other kinds of
311311
// events in the future, we can forward them too.)
312312
let eventHandler = ABIv0.Record.eventHandler(encodeAsJSONLines: true) { json in
313-
try? _backChannelForEntryPoint?.write(json)
313+
_ = try? _backChannelForEntryPoint?.withLock {
314+
try _backChannelForEntryPoint?.write(json)
315+
try _backChannelForEntryPoint?.write("\n")
316+
}
314317
}
315318
configuration.eventHandler = { event, eventContext in
316319
if case .issueRecorded = event.kind {

0 commit comments

Comments
 (0)