Skip to content

Commit

Permalink
Annotate the test observer with @MainActor where needed to be concu…
Browse files Browse the repository at this point in the history
…rrency-safe.

PiperOrigin-RevId: 631886302
  • Loading branch information
allevato authored and swiple-rules-gardener committed May 8, 2024
1 parent 8e001a5 commit 3699230
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/test_observer/BazelXMLTestObserver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public final class BazelXMLTestObserver: NSObject {
///
/// If the `XML_OUTPUT_FILE` environment variable is not set or the file at that path could not be
/// created and opened for writing, the value of this property will be nil.
@MainActor
public static let `default`: BazelXMLTestObserver? = {
guard
let outputPath = ProcessInfo.processInfo.environment["XML_OUTPUT_FILE"],
Expand Down
1 change: 1 addition & 0 deletions tools/test_observer/BazelXMLTestObserverRegistration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/// The principal class in an XCTest bundle on Darwin-based platforms, which registers the
/// XML-generating observer with the XCTest observation center when the bundle is loaded.
@objc(BazelXMLTestObserverRegistration)
@MainActor
public final class BazelXMLTestObserverRegistration: NSObject {
@objc public override init() {
super.init()
Expand Down

1 comment on commit 3699230

@brentleyjones
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please sign in to comment.