Compare commits

..
2 Commits
Author SHA1 Message Date
thischwa df5e622342 Merge remote-tracking branch 'origin/feature/ki-review' into feature/ki-review
Build and Analyse / build-and-analyse (push) Successful in 1m30s
2026-11-04 17:27:44 +01:00
thischwaandClaude Opus 5.5 a6befc1cf3 test: wait for lagging record list in testPaging (#2)
A new client (connection) may see a lagging state of the record list
for a short time, so the small page size check waits until all records
are listed.

refs #2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 17:27:10 +01:00
@@ -534,9 +534,14 @@ public class CfClientTest {
// Without PagingRequest all pages must be fetched, also if the page size is small // Without PagingRequest all pages must be fetched, also if the page size is small
try (CfDnsClient smallPageClient = new CfDnsClient(true, CfDnsClientBuilder.DEFAULT_BASEURL, try (CfDnsClient smallPageClient = new CfDnsClient(true, CfDnsClientBuilder.DEFAULT_BASEURL,
new CfDnsClientBuilder.ApiTokenAuth(API_TOKEN), 5)) { new CfDnsClientBuilder.ApiTokenAuth(API_TOKEN), 5)) {
assertEquals(allRecordIds, smallPageClient.recordList(zone).stream() // a new client (connection) may see a lagging state of the record list for a short time
.map(RecordEntity::getId).collect(Collectors.toSet())); Set<String> smallPageIds = awaitRecords(() -> smallPageClient.recordList(zone),
assertEquals(createdRecords.size(), smallPageClient.recordListByType(zone, RecordType.A).size()); recs -> recs.size() >= allRecordIds.size()).stream()
.map(RecordEntity::getId).collect(Collectors.toSet());
assertEquals(allRecordIds, smallPageIds);
assertEquals(createdRecords.size(), awaitRecords(
() -> smallPageClient.recordListByType(zone, RecordType.A),
recs -> recs.size() >= createdRecords.size()).size());
assertEquals(1, smallPageClient.recordListBySubdomain(zone, pagingSld + "-01").size()); assertEquals(1, smallPageClient.recordListBySubdomain(zone, pagingSld + "-01").size());
} }
} finally { } finally {