Skip to content

Commit

Permalink
Test against latest server versions
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Dec 8, 2023
1 parent f088802 commit 56063b5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/test_query_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def test_last_query_progress_total_rows(self):
last_query = self.client.last_query
self.assertIsNotNone(last_query)
self.assertIsNotNone(last_query.profile_info)
self.assertEqual(last_query.profile_info.rows_before_limit, 10)
rows_before_limit = 10 if self.server_version < (23, 11) else 0
self.assertEqual(
last_query.profile_info.rows_before_limit, rows_before_limit
)

self.assertIsNotNone(last_query.progress)
self.assertEqual(last_query.progress.rows, 10)
Expand Down Expand Up @@ -134,8 +137,8 @@ def test_progress_info_increment(self):
last_query = self.client.last_query
self.assertIsNotNone(last_query)
self.assertIsNotNone(last_query.progress)
self.assertGreater(last_query.progress.rows, 100000000)
self.assertGreater(last_query.progress.bytes, 800000000)
self.assertGreaterEqual(last_query.progress.rows, 100000000)
self.assertGreaterEqual(last_query.progress.bytes, 800000000)

total_rows = 100000000 if self.server_version > (19, 4) else 0
self.assertEqual(last_query.progress.total_rows, total_rows)
Expand Down

0 comments on commit 56063b5

Please sign in to comment.