@@ -131,7 +131,8 @@ def _check_results(cursor, results):
131131 assert results [2 ] == 123456 , "the third result was wrong"
132132
133133
134- def test_insert_select (conn , db_parameters ):
134+ @pytest .mark .skipolddriver
135+ def test_insert_select (conn , db_parameters , caplog ):
135136 """Inserts and selects integer data."""
136137 with conn () as cnx :
137138 c = cnx .cursor ()
@@ -157,20 +158,25 @@ def test_insert_select(conn, db_parameters):
157158 for rec in c :
158159 results .append (rec [0 ])
159160 _check_results (c , results )
161+ assert "Number of results in first chunk: 3" in caplog .text
160162 finally :
161163 c .close ()
162164
163165 with cnx .cursor (snowflake .connector .DictCursor ) as c :
166+ caplog .clear ()
167+ assert "Number of results in first chunk: 3" not in caplog .text
164168 c .execute (
165169 "select aa from {name} order by aa" .format (name = db_parameters ["name" ])
166170 )
167171 results = []
168172 for rec in c :
169173 results .append (rec ["AA" ])
170174 _check_results (c , results )
175+ assert "Number of results in first chunk: 3" in caplog .text
171176
172177
173- def test_insert_and_select_by_separate_connection (conn , db_parameters ):
178+ @pytest .mark .skipolddriver
179+ def test_insert_and_select_by_separate_connection (conn , db_parameters , caplog ):
174180 """Inserts a record and select it by a separate connection."""
175181 with conn () as cnx :
176182 result = cnx .cursor ().execute (
@@ -204,6 +210,7 @@ def test_insert_and_select_by_separate_connection(conn, db_parameters):
204210 c .close ()
205211 assert results [0 ] == 1234 , "the first result was wrong"
206212 assert result .rowcount == 1 , "wrong number of records were selected"
213+ assert "Number of results in first chunk: 1" in caplog .text
207214 finally :
208215 cnx2 .close ()
209216
@@ -752,7 +759,9 @@ def test_closed_cursor(conn, db_parameters):
752759 ), "SNOW-647539: rowcount should remain available after cursor is closed"
753760
754761
755- def test_fetchmany (conn , db_parameters ):
762+ @pytest .mark .skipolddriver
763+ def test_fetchmany (conn , db_parameters , caplog ):
764+
756765 table_name = random_string (5 , "test_fetchmany_" )
757766 with conn () as cnx :
758767 with cnx .cursor () as c :
@@ -773,6 +782,7 @@ def test_fetchmany(conn, db_parameters):
773782
774783 with cnx .cursor () as c :
775784 c .execute (f"select aa from { table_name } order by aa desc" )
785+ assert "Number of results in first chunk: 6" in caplog .text
776786
777787 rows = c .fetchmany (2 )
778788 assert len (rows ) == 2 , "The number of records"
0 commit comments