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):
1613
1613
1614
1614
@pytest .mark .skipolddriver
1615
1615
def test_null_connection (conn_cnx ):
1616
+ retries = 15
1616
1617
with conn_cnx () as con :
1617
1618
with con .cursor () as cur :
1618
1619
cur .execute_async (
1619
1620
"select seq4() as c from table(generator(rowcount=>50000))"
1620
1621
)
1621
1622
con .rest .delete_session ()
1622
1623
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" )
1623
1631
assert status == QueryStatus .FAILED_WITH_ERROR
1624
1632
assert con .is_an_error (status )
1625
1633
You can’t perform that action at this time.
0 commit comments