mirror of
https://github.com/apache/impala.git
synced 2026-01-26 21:02:23 -05:00
test_cancellation runs a shell process, executes a query, sleeps, sends a sigint to the process, and then checks that the query is cancelled. If the sigint is sent prior to the shell installing its signal handler, the test can fail with a KeyboardInterrupt. This patch removes the reliance on the sleep being long enough by actually reading the output of the shell and only cancelling the query once the shell shows that it has started running. Testing: - Ran test_cancellation in a loop. Change-Id: I65302ffb838d5185f77853bc2e53296f3a701d93 Reviewed-on: http://gerrit.cloudera.org:8080/11255 Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Thomas Marshall <thomasmarshall@cmu.edu>