Closed Usipov closed 5 years ago
ci integration failed, becuase the tests are run via swift test
which does not support swift and objective-c files
why not to use simple xcodebuild
?
Hey this looks amazing! It might take a while to look into this though but I love to get this work into master! I wanna thank you first for this PR! cheers!
@Usipov Thanks a lot for your pull request, but I have found an issue with autoreleasepool { .. }
in your implementation of ListDiffStressTests
. You are starting the next iteration synchronously in the same autoreleasepool
block, so some time later the test will crash because of unable to alloc new memory:
xctest(12364,0x7aa21c0) malloc: *** mach_vm_map(size=8388608) failed (error code=3)
*** error: can't allocate region securely
*** set a breakpoint in malloc_error_break to debug
Test using a lot of memory (3.15 GB), as you can see on screenshot.
As a workaround you can dispatch the next test iteration asynchronously on main queue that allows you to properly clear used memory in autorelease pool block.
DispatchQueue.main.async {
self?.performTest(
index: index + 1,
expectations: expectations,
previousCellDataList: cellDataGeneratorResult.to
)
}
@AntonPoltoratskyi, hmmmm...... lol I even had this async dispatch in my uncommited changes. Probably forgot to commit
Adopted this walkarounds
Added stress tests of continuous random collection view updates