Skip to content

Commit

Permalink
Increase timeout in test_rows_availability to make sure query state i…
Browse files Browse the repository at this point in the history
…s what we expect.

Change-Id: Id4feebcc7b7cecb07555009219e6420e48a0c82b
Reviewed-on: http:https://gerrit.ent.cloudera.com:8080/3534
Tested-by: jenkins
Reviewed-by: Nong Li <[email protected]>
Reviewed-on: http:https://gerrit.ent.cloudera.com:8080/3579
  • Loading branch information
Nong Li authored and jenkins committed Jul 22, 2014
1 parent 1d5b944 commit a25400c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions tests/common/impala_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def wait_for_query_state(self, client, query_handle, target_state,
if query_state == target_state:
return
sleep(interval)
assert target_state == query_state, 'Did not reach query state in time'
return

def wait_for_query_status(self, client, query_id, expected_content,
Expand Down
6 changes: 2 additions & 4 deletions tests/experiments/test_process_failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,13 @@ def test_kill_restart_worker(self, vector):
impalad.service.wait_for_num_known_live_backends(CLUSTER_SIZE - 1, timeout=60)

# Wait until the in-flight query has been cancelled.
impalad.service.wait_for_query_state(client, handle,\
client.QUERY_STATES['EXCEPTION'])

# The in-flight query should have been cancelled, reporting a failed worker as the
# cause. The query may have been cancelled because the state store detected a failed
# node, or because a stream sender failed to establish a thrift connection. It is
# non-deterministic which of those paths will initiate cancellation, but in either
# case the query status should include the failed (or unreachable) worker.
assert client.get_state(handle) == client.QUERY_STATES['EXCEPTION']
impalad.service.wait_for_query_state(client, handle,\
client.QUERY_STATES['EXCEPTION'])

# Wait for the query status on the query profile web page to contain the
# expected failed hostport.
Expand Down
3 changes: 2 additions & 1 deletion tests/query_test/test_rows_availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def test_rows_availability(self, vector):
# Execute async to get a handle. Wait until the query has completed.
handle = self.execute_query_async(query, vector.get_value('exec_option'))
self.impalad_test_service.wait_for_query_state(self.client, handle,
self.client.QUERY_STATES['FINISHED'])
self.client.QUERY_STATES['FINISHED'], timeout=20)

# Parse the query profile for the 'Rows available' timeline event.
rows_avail_line = self.__get_rows_available_event(handle)
# Match the parenthesized delta duration between the 'Rows available' event
Expand Down

0 comments on commit a25400c

Please sign in to comment.