Skip to content

Simplify the serial suite trait - #1497

Merged
katiewasnothere merged 1 commit into
apple:mainfrom
katiewasnothere:simplify_serial_suite
May 1, 2026
Merged

Simplify the serial suite trait#1497
katiewasnothere merged 1 commit into
apple:mainfrom
katiewasnothere:simplify_serial_suite

Conversation

@katiewasnothere

@katiewasnothere katiewasnothere commented May 1, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

The SuiteGate actor introduced for the serial test trait in #1489 could be simplified using containerization's AsyncLock.

Testing

  • Tested locally

Note: working on A/B performance testing to validate this approach does not significantly impact test run performance.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
}
}

@Suite struct SuiteGateTests {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does the behavior get tested already in the AsyncLock code?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like no. I can add some tests in containerization for AsyncLock. AsyncLock is being used in critical paths in containerization though (VZVirtualMachineInstance and ImageStore.create, for example).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

...and in pretty much all of the container-apiserver services so that they don't have to deal with actor reentrancy.

@katiewasnothere
katiewasnothere merged commit e57c755 into apple:main May 1, 2026
4 checks passed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hello

dcantah pushed a commit to apple/containerization that referenced this pull request May 1, 2026
These tests were requested as part of a test change in
apple/container#1497. These tests mimic a lot of
the tests in
https://github.com/apple/containerization/blob/main/Tests/ContainerizationExtrasTests/AsyncMutexTests.swift
where possible/appropriate.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
noah-thor pushed a commit to noah-thor/container that referenced this pull request May 6, 2026
## Motivation and Context
The `SuiteGate` actor introduced for the serial test trait in
apple#1489 could be simplified using
containerization's
[AsyncLock](https://github.com/apple/containerization/blob/f2c42402e744df992fecb84eb3a82935c6fa01d3/Sources/ContainerizationExtras/AsyncLock.swift#L23).

## Testing
- [ ] Tested locally

Note: working on A/B performance testing to validate this approach does
not significantly impact test run performance.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
simone-panico pushed a commit to simone-panico/containerization that referenced this pull request May 19, 2026
These tests were requested as part of a test change in
apple/container#1497. These tests mimic a lot of
the tests in
https://github.com/apple/containerization/blob/main/Tests/ContainerizationExtrasTests/AsyncMutexTests.swift
where possible/appropriate.

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants