curl-curl/tests/data/test1669
Daniel Stenberg 0805ec043e
altsvc: cap the list at 5,000 entries
Avoid never-ending growth.

When adding more entries, it now deletes the first entry in the list,
which is the oldest added entry still held in memory. I decided to avoid
a Least Recently Used concept as I suspect with a list with this many
entries most entries have not been used, and we don't save the timestamp
of recent use anyway.

The net effect might (no matter what) be that the removed entry might
feel a bit "random" in the eyes of the user.

Verify with test 1669.

Reported-by: Geeknik Labs
Fixes #21183
Closes #21189
2026-04-01 12:05:47 +02:00

38 lines
588 B
XML

<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
unittest
Alt-Svc
</keywords>
</info>
<client>
<features>
unittest
alt-svc
</features>
# This date is exactly "20190124 22:34:21" UTC
<setenv>
CURL_TIME=1548369261
</setenv>
<name>
alt-svc load cache with >5000 entries
</name>
<command>
%LOGDIR/%TESTNUMBER
</command>
<file name="%LOGDIR/%TESTNUMBER" mode="text">
%repeat[5010 x h2 example.com 443 h3 shiny.example.com 8443 "20191231 00:00:00" 0 0%0a]%
</file>
</client>
<verify>
<limits>
Allocations: 5100
Maximum allocated: 600000
</limits>
</verify>
</testcase>