From f8a4843497e75492df5cd49f9d28a8c22e904e02 Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Thu, 2 Jun 2022 11:25:25 +0200 Subject: [PATCH 1/2] tests(axum): create SocketAddr to fix flappy test Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- apollo-router/src/axum_http_server_factory.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/apollo-router/src/axum_http_server_factory.rs b/apollo-router/src/axum_http_server_factory.rs index dcdc0ad836..33d4ce8068 100644 --- a/apollo-router/src/axum_http_server_factory.rs +++ b/apollo-router/src/axum_http_server_factory.rs @@ -1457,6 +1457,7 @@ Content-Type: application/json\r let conf = Configuration::builder() .server( crate::configuration::Server::builder() + .listen(SocketAddr::from_str("127.0.0.1:0").unwrap()) .health_check_path("/health") .build(), ) From 3e96b370d3fdee9be10fa570a62c91fef7d9b892 Mon Sep 17 00:00:00 2001 From: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> Date: Thu, 2 Jun 2022 11:29:46 +0200 Subject: [PATCH 2/2] changelog Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com> --- NEXT_CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 9891a5d59e..3316635184 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -35,4 +35,11 @@ server: health_check_path: /health ``` -By [@jcaromiq](https://github.com/jcaromiq) in https://github.com/apollographql/router/pull/1164 \ No newline at end of file +By [@jcaromiq](https://github.com/jcaromiq) in https://github.com/apollographql/router/pull/1164 + +## 🛠 Maintenance ( :hammer_and_wrench: ) + +### Fix a flappy test to test custom health check path ([PR #1176](https://github.com/apollographql/router/pull/1176)) +Force the creation of `SocketAddr` to use a new unused port. + +By [@bnjjj](https://github.com/bnjjj) in https://github.com/apollographql/router/pull/1176