Skip to content

Commit fc0b7bb

Browse files
committed
PR feedback
1 parent 46fb8bd commit fc0b7bb

File tree

4 files changed

+18
-22
lines changed

4 files changed

+18
-22
lines changed

Documentation/ABI/JSON.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,10 @@ sufficient information to display the event in a human-readable format.
197197
"runEnded" ; additional event kinds may be added in the future
198198
199199
<issue> ::= {
200-
<!--
201-
TODO: Publicize the severity field.
202-
"severity" ::= <issue-severity>, ; the severity of the issue
203-
-->
204200
"isKnown": <bool>, ; is this a known issue or not?
205201
["sourceLocation": <source-location>,] ; where the issue occurred, if known
206202
}
207203
208-
<!--
209-
TODO: Publicize the severity field.
210-
<issue-severity> ::= "warning" | "error" ; additional severity levels may be
211-
; added in the future
212-
-->
213-
214204
<message> ::= {
215205
"symbol": <message-symbol>,
216206
"text": <string>, ; the human-readable text of this message
@@ -220,6 +210,12 @@ sufficient information to display the event in a human-readable format.
220210
"fail" | "difference" | "warning" | "details"
221211
```
222212

213+
<!--
214+
TODO: Publicize issue severity.
215+
<issue-severity> ::= "warning" | "error" ; additional severity levels may be
216+
; added in the future
217+
-->
218+
223219
<!--
224220
["testID": <test-id>,
225221
["testCase": <test-case>]]

Sources/Testing/ABI/EntryPoints/EntryPoint.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ public func configurationForEntryPoint(from args: __CommandLineArguments_v0) thr
551551
case .some(...0):
552552
// If the event stream version was specified explicitly to a value < 1,
553553
// disable delivery of warning issue events to maintain legacy behavior.
554-
configuration.eventHandlingOptions.isWarningIssueEventDeliveryEnabled = false
554+
configuration.eventHandlingOptions.isWarningIssueRecordedEventEnabled = false
555555
default:
556556
break
557557
}

Sources/Testing/Events/Event.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ extension Configuration.EventHandlingOptions {
314314
fileprivate func shouldHandleEvent(_ event: borrowing Event) -> Bool {
315315
switch event.kind {
316316
case let .issueRecorded(issue):
317-
issue.severity > .warning || isWarningIssueEventDeliveryEnabled
317+
issue.severity > .warning || isWarningIssueRecordedEventEnabled
318318
case .expectationChecked:
319-
isExpectationCheckedEventDeliveryEnabled
319+
isExpectationCheckedEventEnabled
320320
default:
321321
true
322322
}

Sources/Testing/Running/Configuration.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ public struct Configuration: Sendable {
185185
/// containing issues with warning (or lower) severity should be delivered
186186
/// to the event handler of the configuration these options are applied to.
187187
///
188-
/// By default, events matching this criteria are delivered to event
189-
/// handlers unless the entry point specifies an event stream version which
190-
/// predates the introduction of warning issues, in which case this is
191-
/// disabled to maintain legacy behavior.
192-
public var isWarningIssueEventDeliveryEnabled: Bool = true
188+
/// By default, events matching this criteria are not delivered to event
189+
/// handlers since this is an experimental feature.
190+
///
191+
/// - Warning: Warning issues are not yet an approved feature.
192+
public var isWarningIssueRecordedEventEnabled: Bool = false
193193

194194
/// Whether or not events of the kind
195195
/// ``Event/Kind-swift.enum/expectationChecked(_:)`` should be delivered to
@@ -198,7 +198,7 @@ public struct Configuration: Sendable {
198198
/// By default, events of this kind are not delivered to event handlers
199199
/// because they occur frequently in a typical test run and can generate
200200
/// significant back-pressure on the event handler.
201-
public var isExpectationCheckedEventDeliveryEnabled: Bool = false
201+
public var isExpectationCheckedEventEnabled: Bool = false
202202
}
203203

204204
/// The options to use when delivering events to this configuration's event
@@ -347,13 +347,13 @@ extension Configuration {
347347
}
348348
#endif
349349

350-
@available(*, deprecated, message: "Set eventHandlingOptions.isExpectationCheckedEventDeliveryEnabled instead.")
350+
@available(*, deprecated, message: "Set eventHandlingOptions.isExpectationCheckedEventEnabled instead.")
351351
public var deliverExpectationCheckedEvents: Bool {
352352
get {
353-
eventHandlingOptions.isExpectationCheckedEventDeliveryEnabled
353+
eventHandlingOptions.isExpectationCheckedEventEnabled
354354
}
355355
set {
356-
eventHandlingOptions.isExpectationCheckedEventDeliveryEnabled = newValue
356+
eventHandlingOptions.isExpectationCheckedEventEnabled = newValue
357357
}
358358
}
359359
}

0 commit comments

Comments
 (0)