Skip to content

Testing: EdgeLearner missing test for multi-batch pagination (>100 entries) #2214

@mrveiss

Description

@mrveiss

Problem

`EdgeLearner.consume_feedback_stream()` paginates Redis streams in batches of 100 entries. The exclusive cursor approach (PR #2179) correctly handles pagination boundaries, but there is no test that verifies this with >100 entries.

A test with a multi-batch scenario (e.g. 150 entries across 2 xrange calls) would verify no duplicates or missed entries at pagination boundaries.

Discovered During

Code review of PR #2179 (issue #2102)

Fix

Add a test in `edge_learner_test.py` that mocks `xrange` returning 100 entries on the first call and 50 on the second, then verifies exactly 150 calls to `on_retrieval`.

Impact

Low — the code is correct, but the test gap means regressions could slip through.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions