MaksymSkorupskyi commented on a change in pull request #14460:
URL: https://github.com/apache/beam/pull/14460#discussion_r645765221
##########
File path: sdks/python/apache_beam/io/mongodbio_test.py
##########
@@ -219,15 +226,87 @@ def __exit__(self, exc_type, exc_val, exc_tb):
pass
-@parameterized_class(('bucket_auto', ), [(None, ), (True, )])
+# Generate test data for MongoDB collections of different types
+OBJECT_IDS = [
+ objectid.ObjectId.from_datetime(
+ datetime.datetime(year=2020, month=i + 1, day=i + 1)) for i in range(5)
+]
+
+INT_IDS = [n for n in range(5)] # [0, 1, 2, 3, 4]
+
+STR_IDS_1 = [str(n) for n in range(5)] # ['0', '1', '2', '3', '4']
+
+# ['aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee']
+STR_IDS_2 = [chr(97 + n) * 5 for n in range(5)]
+
+# ['AAAAAAAAAAAAAAAAAAAA', 'BBBBBBBBBBBBBBBBBBBB', ..., 'EEEEEEEEEEEEEEEEEEEE']
+STR_IDS_3 = [chr(65 + n) * 20 for n in range(5)]
+
+
+@parameterized_class(('bucket_auto', '_ids', 'min_id', 'max_id'),
+ [
Review comment:
Yes, nice idea, but I am not sure this would be easier to read :) Let's
not overcomplicate testcases
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]