Why does the Swift Testing framework only support timeouts measured in minutes? When writing XCTestCase tests, I frequently use “expectations” measured in seconds, not minutes. If I’m unit testing something that slow, I’d generally mock the slow service with something that returned results in a reasonable timeframe. I don’t necessarily mind that they support “minutes”, but it seems odd to not support a much shorter timeout. What is the thought process here? https://developer.apple.com/documentation/testing/limitingexecutiontime
=> More informations about this toot | More toots from robertryan@mastodon.social
@robertryan I think there’s some documentation that explains this in the docc content. But yeah it’s weird and you aren’t the first person to think so.
=> More informations about this toot | More toots from mattiem@mastodon.social
@mattiem Yeah the headers say: “It is used instead of Swift's built-in Duration
type because test timeouts do not support high-precision, arbitrarily short durations. The smallest allowed unit of time is minutes.” Sure, maybe not nanoseconds or attoseconds. But surely “seconds” doesn’t qualify as “high-precision”. Lol.
=> More informations about this toot | More toots from robertryan@mastodon.social This content has been proxied by September (3851b).Proxy Information
text/gemini