Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[java] Deflake TestKuduSession.testInsertAutoFlushBackgroundNonCovere…
…dRange The test uses an AsyncKuduSession in AUTO_FLUSH_BACKGROUND mode to send 20 inserts. 10 of them should fail because they are in a non-covered range. However, the test did not join on the deferred when it called AsyncKuduSession#flush. Therefore, there was no guarantee the operations had been completed. So, every now and then, the ops were still in flight when the errors were checked, causing the test to fail because it saw no error where it expected to see errors. Before this fix, the test failed because of this problem about 1/1000 times. I ran 1000 with the fix and saw no failures, but the rate was so low maybe I was lucky. Regardless, I'm confident the test is more correct with this fix. Change-Id: I40360e9c7979c2edf01b4a70b64f71af4d1a1e11 Reviewed-on: http://gerrit.cloudera.org:8080/13497 Tested-by: Will Berkeley <[email protected]> Reviewed-by: Grant Henke <[email protected]>
- Loading branch information