Skip to content

Skip LargeDataTests when memory limits are small#1861

Merged
jmschonfeld merged 1 commit intoswiftlang:mainfrom
jmschonfeld:large-data-mem-limits
Mar 28, 2026
Merged

Skip LargeDataTests when memory limits are small#1861
jmschonfeld merged 1 commit intoswiftlang:mainfrom
jmschonfeld:large-data-mem-limits

Conversation

@jmschonfeld
Copy link
Copy Markdown
Contributor

LargeDataTests uses a large amount of memory, so we should skip it when the memory limits are too constrained

Motivation:

On some platforms like iOS, there may be memory limits beyond just the memory available to the device that could prevent us from making large allocations. We should avoid running these tests when limits are in place

Modifications:

Use os_proc_available_memory to avoid running tests when memory limits are too constrained

Result:

Tests do not crash when memory limits are in place

Testing:

This is a unit test change

@jmschonfeld jmschonfeld requested a review from a team as a code owner March 27, 2026 21:06
@jmschonfeld
Copy link
Copy Markdown
Contributor Author

@swift-ci please test

Copy link
Copy Markdown
Contributor

@glessard glessard left a comment

Choose a reason for hiding this comment

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

I agree this is the best option we have at the moment.

@jmschonfeld jmschonfeld merged commit 4bb9d04 into swiftlang:main Mar 28, 2026
22 checks passed
@jmschonfeld jmschonfeld deleted the large-data-mem-limits branch March 28, 2026 01:02
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.

2 participants