Skip to content

Commit da453c5

Browse files
committed
test: clarify oldest-first eviction comment in question-history test
1 parent 1a1f974 commit da453c5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tests/test_history.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ def test_question_history_evicts_oldest_first():
104104
first = r.DNSQuestion("_first._tcp.local.", const._TYPE_PTR, const._CLASS_IN)
105105
history.add_question_at_time(first, now, answers)
106106

107-
# Fill remaining slots with fresh, non-expired entries.
107+
# Add `cap` more fresh, non-expired entries — one past the cap — so the
108+
# final insertion forces oldest-first eviction of `first`.
108109
for i in range(cap):
109110
q = r.DNSQuestion(f"_svc{i}._tcp.local.", const._TYPE_PTR, const._CLASS_IN)
110111
history.add_question_at_time(q, now, answers)

0 commit comments

Comments
 (0)