Skip to content

Add tests for the MockDnsServer - #6605

Merged
vietj merged 1 commit into
masterfrom
add-tests-to-mock-dns-server
Nov 30, 2026
Merged

vietj merged 1 commit into
masterfrom
add-tests-to-mock-dns-server

Conversation

@vietj

@vietj vietj commented Nov 30, 2026

Copy link
Copy Markdown
Member

Motivation:

The mock DNS server is only exercised indirectly through the Vert.x DNS client
and will be ported to Netty, so it needs tests of its own that do not rely on
Netty for verification.

Changes:

Add MockDnsServerTest verifying the server with the dnsjava client library:
record factories at the wire level, question echo, store failure reporting,
query recording and lifecycle. The tests revealed that recorded queries were
cleared before they could be polled: the stored message is now retained, and
un-polled messages are released on stop. Also align the ns/cname record
factories on the (record name, ttl, data) parameter order used by ptr/dname.

Assisted-by: Anthropic Claude (claude-fable-5)
Signed-off-by: Julien Viet julien@julienviet.com

Motivation:

The mock DNS server is only exercised indirectly through the Vert.x DNS client
and will be ported to Netty, so it needs tests of its own that do not rely on
Netty for verification.

Changes:

Add MockDnsServerTest verifying the server with the dnsjava client library:
record factories at the wire level, question echo, store failure reporting,
query recording and lifecycle. The tests revealed that recorded queries were
cleared before they could be polled: the stored message is now retained, and
un-polled messages are released on stop. Also align the ns/cname record
factories on the (record name, ttl, data) parameter order used by ptr/dname.

Assisted-by: Anthropic Claude (claude-fable-5)
Signed-off-by: Julien Viet <julien@julienviet.com>
@vietj vietj added this to the 5.3.0 milestone Nov 30, 2026
@vietj
vietj merged commit 2a94f34 into master Nov 30, 2026
8 checks passed
@vietj
vietj deleted the add-tests-to-mock-dns-server branch November 30, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant