Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 6cdd0a6

Browse files
author
Sergey Vasilyev
committed
Expect some downloaded rows for fuzzily diffed column types
1 parent 72d4091 commit 6cdd0a6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_database_types.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,11 @@ def test_types(self, source_db, target_db, source_type, target_type, type_catego
726726
checksum_duration = time.monotonic() - start
727727
expected = []
728728
self.assertEqual(expected, diff)
729-
self.assertEqual(
730-
0, differ.stats.get("rows_downloaded", 0)
731-
) # This may fail if the hash is different, but downloaded values are equal
729+
730+
# For fuzzily diffed types, some rows can be downloaded for local comparison. This happens
731+
# when hashes are diferent but the essential payload is not; e.g. due to json serialization.
732+
if not {source_type, target_type} & {'json', 'jsonb', 'array', 'struct'}:
733+
self.assertEqual(0, differ.stats.get("rows_downloaded", 0))
732734

733735
# This section downloads all rows to ensure that Python agrees with the
734736
# database, in terms of comparison.

0 commit comments

Comments
 (0)