File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ from typing import Callable
2+
13from pytest import raises
24
35from firebolt .async_db import Connection
46from firebolt .utils .exception import QueryTimeoutError
7+ from tests .integration .dbapi .conftest import LONG_SELECT_DEFAULT_V2
58
69# Cannot have absolute path here since interpreter treats word async as keyword and not as a package name
710from .test_queries_async import LONG_SELECT
811
912
10- async def test_query_timeout (connection : Connection ):
13+ async def test_query_timeout (
14+ connection : Connection , long_test_value : Callable [[int ], int ]
15+ ) -> None :
1116 async with connection .cursor () as cursor :
1217 with raises (QueryTimeoutError ):
13- await cursor .execute (LONG_SELECT , timeout_seconds = 1 )
18+ await cursor .execute (
19+ LONG_SELECT .format (long_value = long_test_value (LONG_SELECT_DEFAULT_V2 )),
20+ timeout_seconds = 1 ,
21+ )
Original file line number Diff line number Diff line change 1+ from typing import Callable
2+
13from pytest import raises
24
35from firebolt .db import Connection
46from firebolt .utils .exception import QueryTimeoutError
7+ from tests .integration .dbapi .conftest import LONG_SELECT_DEFAULT_V2
58
69from .test_queries import LONG_SELECT
710
811
9- def test_query_timeout (connection : Connection ):
12+ def test_query_timeout (
13+ connection : Connection , long_test_value : Callable [[int ], int ]
14+ ) -> None :
1015 with connection .cursor () as cursor :
1116 with raises (QueryTimeoutError ):
12- cursor .execute (LONG_SELECT , timeout_seconds = 1 )
17+ cursor .execute (
18+ LONG_SELECT .format (long_value = long_test_value (LONG_SELECT_DEFAULT_V2 )),
19+ timeout_seconds = 1 ,
20+ )
You can’t perform that action at this time.
0 commit comments