Skip to content

Commit abc5373

Browse files
committed
Update tests so they also pass with datastore emulator and add
additional asserts. Datastore doesn't support such large number of items so we use a smaller number.
1 parent 3902b02 commit abc5373

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

datastore/tests/system/test_system.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,13 +398,21 @@ def test_query_paginate_simple_timestamp_keys(self):
398398

399399
def test_query_offset_timestamp_keys(self):
400400
# See issue #4675
401-
max_all = 10000
401+
max_all = 1000
402402
offset = 1
403403
max_offset = max_all - offset
404404
query = self.CLIENT.query(kind="timestamp_key")
405405
all_w_limit = list(query.fetch(limit=max_all))
406+
406407
self.assertEqual(len(all_w_limit), max_all)
407408

409+
offset = 1
410+
max_offset = max_all - offset
411+
offset_w_limit = list(query.fetch(offset=offset, limit=max_offset))
412+
self.assertEqual(offset_w_limit, all_w_limit[offset:])
413+
414+
offset = 50
415+
max_offset = max_all - offset
408416
offset_w_limit = list(query.fetch(offset=offset, limit=max_offset))
409417
self.assertEqual(offset_w_limit, all_w_limit[offset:])
410418

0 commit comments

Comments
 (0)