Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions cmuxTests/FilePreviewReviewFeedbackTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ struct FilePreviewReviewFeedbackTests {
#expect(!coordinator.focus(.textEditor))

let window = NSWindow(contentRect: textView.bounds, styleMask: [], backing: .buffered, defer: false)
// AppKit releases a closed window unless the owner opts out, and callers close
// this window. Without this the close over-releases and kills the test host,
// losing this suite's verdict and its shard-mates' along with it.
window.isReleasedWhenClosed = false
defer {
window.contentView = nil
Expand Down
5 changes: 5 additions & 0 deletions cmuxTests/TerminalNotificationSocketActionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ final class TerminalNotificationSocketActionTests: XCTestCase {
backing: .buffered,
defer: false
)
// AppKit releases a closed window unless the owner opts out, and this
// fixture's window is closed below. Without this the close over-releases
// and kills the test host, losing this suite's verdict and its
// shard-mates' along with it.
testWindow.isReleasedWhenClosed = false
testWindow.identifier = NSUserInterfaceItemIdentifier("cmux.main.\(registeredWindowId.uuidString)")
testWindow.makeKeyAndOrderFront(nil)
windowId = registeredWindowId
Expand Down
4 changes: 4 additions & 0 deletions cmuxTests/WindowAndDragTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3671,6 +3671,10 @@ final class FilePreviewPanelTextSavingTests: XCTestCase {
backing: .buffered,
defer: false
)
// AppKit releases a closed window unless the owner opts out, and callers close
// this window. Without this the close over-releases and kills the test host,
// losing this suite's verdict and its shard-mates' along with it.
window.isReleasedWhenClosed = false
let scrollView = NSScrollView(frame: window.contentView?.bounds ?? .zero)
scrollView.autoresizingMask = [.width, .height]
window.contentView?.addSubview(scrollView)
Expand Down