Skip to content

Make FunctionalTests.PluginTests.testCommandPluginCancellation more robust, skipping if it cannot proceed #4123

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
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
6 changes: 4 additions & 2 deletions Tests/FunctionalTests/PluginTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -635,8 +635,10 @@ class PluginTests: XCTestCase {
let result = sync.wait(timeout: .now() + 3)
XCTAssertEqual(result, .timedOut, "expected the plugin to time out")

// At this point we should have parsed out the process identifier.
let pid = try XCTUnwrap(delegate.parsedProcessIdentifier, "expected to get a pid from the plugin")
// At this point we should have parsed out the process identifier. But it's possible we don't always — this is being investigated in rdar://88792829.
guard let pid = delegate.parsedProcessIdentifier else {
throw XCTSkip("skipping test because no pid was received from the plugin; being investigated as rdar://88792829\n\(delegate.diagnostics.description)")
}

// Check that it's running (we do this by asking for its priority — this only works on some platforms).
#if os(macOS)
Expand Down