File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1613,13 +1613,21 @@ def test_fetch_batches_with_sessions(conn_cnx):
16131613
16141614@pytest .mark .skipolddriver
16151615def test_null_connection (conn_cnx ):
1616+ retries = 15
16161617 with conn_cnx () as con :
16171618 with con .cursor () as cur :
16181619 cur .execute_async (
16191620 "select seq4() as c from table(generator(rowcount=>50000))"
16201621 )
16211622 con .rest .delete_session ()
16221623 status = con .get_query_status (cur .sfqid )
1624+ for _ in range (retries ):
1625+ if status not in (QueryStatus .RUNNING ,):
1626+ break
1627+ time .sleep (1 )
1628+ status = con .get_query_status (cur .sfqid )
1629+ else :
1630+ pytest .fail (f"query is still running after { retries } retries" )
16231631 assert status == QueryStatus .FAILED_WITH_ERROR
16241632 assert con .is_an_error (status )
16251633
You can’t perform that action at this time.
0 commit comments