swift-async-algorithms
swift-async-algorithms copied to clipboard
Several tests fail or hang on linux with the official trunk snapshot toolchains
I see this both on linux x86_64 and Android AArch64. Is there no linux CI for this repo?
Are you still seeing this issue?
Yes, I see several tests hanging and failing on linux x86_64 with the latest Feb. 21 official trunk snapshot build for Ubuntu 20.04 x86_64 testing the latest trunk commit ffa6ee9. In particular, these tests all hang on Android AArch64 also:
AsyncAlgorithmsTests.TestCombineLatest2/test_throwing_ordering1
AsyncAlgorithmsTests.TestCombineLatest2/test_throwing_ordering2
AsyncAlgorithmsTests.TestZip2/test_zip_produces_one_element_and_throws_when_first_produces_one_element_and_throws
AsyncAlgorithmsTests.TestZip2/test_zip_produces_one_element_and_throws_when_second_produces_one_element_and_throws
AsyncAlgorithmsTests.TestZip3/test_zip_produces_one_element_and_throws_when_first_produces_one_element_and_throws
AsyncAlgorithmsTests.TestZip3/test_zip_produces_one_element_and_throws_when_second_produces_one_element_and_throws
AsyncAlgorithmsTests.TestZip3/test_zip_produces_one_element_and_throws_when_third_produces_one_element_and_throws
A handful more also fail, let me know if you cannot reproduce.
This PR should fix it: https://github.com/apple/swift-async-algorithms/pull/254
I'm still seeing a few sporadically hanging tests on Android AArch64, particularly if all the tests are run in parallel. This is when building the latest trunk commit from a couple weeks ago, e6b21d2.
I just cross-compiled the latest trunk snapshot toolchain for Android AArch64 and the following test hung once out of 10 runs of swift test --parallel
:
TestBuffer/test_given_a_buffered_bounded_sequence_when_cancelling_consumer_then_the_iteration_finishes_and_the_base_is_cancelled
I also tried running 10 times with the last March 16 trunk source snapshot that I built natively on my Android phone, and that previous test hung once and this test hung once:
TestZip2/test_zip_finishes_when_iteration_task_is_cancelled
@buttaface Thanks for raising. This these tests are problematic because they are using test expectations which just don't work nicely in async methods. We should refactor these tests to become deterministic. This can be achieved with using AsyncStream
etc.