Fix flaky gpcloud S3KeyReaderTest unit test (#7576)
S3KeyReaderTest.MTReadWithUnexpectedFetchDataAtSecondRound is a flaky case, related to multithread timing. The case setup S3KeyReader and try to download in parallel with 2 chunks(threads). When any of them encounters an error, all thread will abort with the shared error. The case assumed that the first created thread will call fetchData() twice before another thread fetch with error. But if the first thread is never scheduled to run, the second thread will call fetchData() first and sets the shared error. Then the first thread continues and will exit at the first call to fetchData(), reporting shared error. Modify the second call to fetchData() to be at most once.
Showing
想要评论请 注册 或 登录