Files
impala/tests/custom_cluster/test_concurrent_kudu_create.py
stiga-huang 3b8609f400 IMPALA-9289: Fix flakiness in TestConcurrentKuduCreate
The test uses a thread pool of 3 slots to run 3 concurrent CreateTable
statements. Each thread creates a client and closes it at the end of the
task(run_create_table_if_not_exists). The first 2 thread tasks start at
the same time. Then after one second, the 3rd thread task starts.
Ideally the 3 tasks should be executed in 3 different threads of the
thread pool. However, if any of the first 2 tasks finish in 1s, the 3rd
task could be executed by reusing the thread. Since the client in the
thread is closed, the task fails.

This patch removes the close operation at the end of the task.
Connection of the thread can be reused and will be closed when the
thread terminates.

Also fix the same problem in test_concurrent_ddls.py.

Tests:
 - Run test_concurrent_ddls.py and test_concurrent_kudu_create.py. In
   the logs of impalad, observe that connections are being reused and
   closed at the end of the tests.

Change-Id: Idefba98ecd65efbd47b1618291330795ef13b910
Reviewed-on: http://gerrit.cloudera.org:8080/15151
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2020-02-05 06:23:44 +00:00

2.4 KiB