Replies: 3 comments
-
Hi @Rspoon3, I can't seem to reproduce this:
I've run it a dozen times and never seen it go above 5 seconds. I don't doubt that you are seeing strange times, but I'm not sure how it could be caused by this library and don't think there's much we could do to fix it. Now one difference in my set up is that I am still on Xcode 15.3. I'm downloading 15.4 now, but perhaps that could be the problem. Also I believe iOS simulators still run with a cooperative thread pool of just a single thread, and so perhaps that is also problematic. Do the tests run faster on macOS? |
Beta Was this translation helpful? Give feedback.
-
I was able to download Xcode 15.4 and the test suite definitely runs a bit slower. I had one run of about 30 seconds, but on average I'm seeing closer to 5-8 seconds. Running tests on macOS seems to be about the same. It's seeming pretty clear that this not really an issue with the library, but perhaps a regression in Xcode, so I am going to convert it to a discussion. Let's continue the conversation over there! |
Beta Was this translation helpful? Give feedback.
-
On macOS they're much faster. I can execute all 19 tests in 4.36 seconds. I was running some other tests earlier today that don't have clocks associated with them, but that do use `Task.megaYield. Those tests were noticeably slower as well. The slow downs might have something to do with that. |
Beta Was this translation helpful? Give feedback.
-
Description
I noticed in a project of mine that using the
TestClock
was causing tests to become incredibly slow. I made a very simple demo app and was able to reproduce the problem. After that I thought I would try running the tests that came with the library. The same thing occurs. Tests are taking seconds to run (sometimes close to a minute) as well as failing.I am testing on Xcode 15.4 (15F31d) with an iPhone 14 (17.4) simulator. I can also reproduce on the 17.5 and 16.4 simulators.
Checklist
main
branch of this package.Expected behavior
Tests should run in a fraction of a second.
Actual behavior
Tests are taking seconds to run (sometimes close to a minute) as well as failing.
Steps to reproduce
swift-clocks version information
2c74776
Destination operating system
iOS 16 and 17
Xcode version information
Xcode 15.4 (15F31d)
Swift Compiler version information
Beta Was this translation helpful? Give feedback.
All reactions