@@ -148,7 +148,7 @@ def test_load_from_checkpoint_happy_path(
148
148
assert confluence_client is not None , "bad test setup"
149
149
paginated_cql_mock = cast (MagicMock , confluence_client .paginated_cql_retrieval )
150
150
paginated_cql_mock .side_effect = [
151
- [mock_page1 , mock_page2 ],
151
+ [mock_page1 , mock_page2 , mock_page3 ],
152
152
[], # comments
153
153
[], # attachments
154
154
[], # comments
@@ -366,22 +366,16 @@ def test_checkpoint_progress(
366
366
confluence_connector , 0 , end_time
367
367
)
368
368
369
- assert len (outputs ) == 2
369
+ assert len (outputs ) == 1
370
370
371
371
first_checkpoint = outputs [0 ].next_checkpoint
372
- last_checkpoint = outputs [- 1 ].next_checkpoint
373
372
374
373
assert first_checkpoint == ConfluenceCheckpoint (
375
374
last_updated = later_timestamp .timestamp (),
376
- has_more = True ,
375
+ has_more = False ,
377
376
last_seen_doc_ids = ["1" , "2" ],
378
377
)
379
378
380
- # Verify checkpoint contains both document IDs and latest timestamp
381
- assert last_checkpoint == ConfluenceCheckpoint (
382
- last_updated = later_timestamp .timestamp (), has_more = False , last_seen_doc_ids = []
383
- )
384
-
385
379
assert len (outputs [0 ].items ) == 2
386
380
assert isinstance (outputs [0 ].items [0 ], Document )
387
381
assert outputs [0 ].items [0 ].semantic_identifier == "Page 1"
@@ -404,11 +398,12 @@ def test_checkpoint_progress(
404
398
]
405
399
406
400
# Use the checkpoint from first run
401
+ first_checkpoint .has_more = True
407
402
outputs_with_checkpoint = load_everything_from_checkpoint_connector_from_checkpoint (
408
403
confluence_connector , 0 , end_time , first_checkpoint
409
404
)
410
405
411
- # Verify no documents were processed since they were in last_seen_doc_ids
406
+ # Verify only the new page was processed since the others were in last_seen_doc_ids
412
407
assert len (outputs_with_checkpoint ) == 1
413
408
assert len (outputs_with_checkpoint [0 ].items ) == 1
414
409
assert isinstance (outputs_with_checkpoint [0 ].items [0 ], Document )
0 commit comments