mirror of
https://github.com/hickory-dns/hickory-dns.git
synced 2026-04-25 11:15:54 +03:00
[PR #2741] [MERGED] Use async test attribute macros #3275
Labels
No labels
blocked
breaking-change
bug
bug:critical
bug:tests
cleanup
compliance
compliance
compliance
crate:all
crate:client
crate:native-tls
crate:proto
crate:recursor
crate:resolver
crate:resolver
crate:rustls
crate:server
crate:util
dependencies
docs
duplicate
easy
easy
enhance
enhance
enhance
feature:dns-over-https
feature:dns-over-quic
feature:dns-over-tls
feature:dnsssec
feature:global_lb
feature:mdns
feature:tsig
features:edns
has workaround
ops
perf
platform:WASM
platform:android
platform:fuchsia
platform:linux
platform:macos
platform:windows
pull-request
question
test
tools
tools
trust
unclear
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hickory-dns#3275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hickory-dns/hickory-dns/pull/2741
Author: @divergentdave
Created: 1/25/2025
Status: ✅ Merged
Merged: 1/26/2025
Merged by: @divergentdave
Base:
main← Head:david/tokio-test-macro📝 Commits (2)
04113bcUse async test attribute macros130e46dFix ignored www.example.com test📊 Changes
21 files changed (+874 additions, -1023 deletions)
View changed files
📝
crates/async-std-resolver/src/tests.rs(+76 -129)📝
crates/proto/src/h2/h2_client_stream.rs(+53 -46)📝
crates/proto/src/h3/h3_client_stream.rs(+46 -46)📝
crates/proto/src/multicast/mdns_stream.rs(+3 -4)📝
crates/proto/src/tcp/tcp_client_stream.rs(+7 -14)📝
crates/proto/src/tcp/tcp_stream.rs(+7 -14)📝
crates/proto/src/tests/tcp.rs(+15 -27)📝
crates/proto/src/tests/udp.rs(+6 -13)📝
crates/proto/src/udp/udp_client_stream.rs(+6 -13)📝
crates/proto/src/udp/udp_stream.rs(+13 -20)📝
crates/resolver/src/h2.rs(+13 -14)📝
crates/resolver/src/h3.rs(+10 -12)📝
crates/resolver/src/name_server/name_server.rs(+25 -36)📝
crates/resolver/src/name_server/name_server_pool.rs(+14 -17)📝
crates/resolver/src/quic.rs(+10 -12)📝
crates/resolver/src/resolver.rs(+178 -222)📝
crates/resolver/src/tls.rs(+10 -13)📝
crates/server/src/server/server_future.rs(+11 -14)📝
tests/integration-tests/tests/integration/client_future_tests.rs(+271 -243)📝
tests/integration-tests/tests/integration/dnssec_client_handle_tests.rs(+55 -54)...and 1 more files
📄 Description
This changes most unit tests that currently manually construct Tokio/async-std runtimes to instead use attribute macros, making the whole test function async. I skipped some trickier tests, i.e. ignored tests that are currently failing, or tests that explicitly check functionality across two async runtime instances.
I also added
subscribe();to the top of some tests, and fixed anotherwww.example.comissue in an ignored test.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.