From 2dbfcd4f776c7f0c7a146f75c74edf1c5def6710 Mon Sep 17 00:00:00 2001 From: staszek-krotki <16387248+staszek-krotki@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:00:49 +0100 Subject: [PATCH] fix test (#3037) * fix randomly failing test by using sort --- exe-unit/components/gsb-http-proxy/src/headers.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/exe-unit/components/gsb-http-proxy/src/headers.rs b/exe-unit/components/gsb-http-proxy/src/headers.rs index 2f3fa362aa..2ac2e12aa0 100644 --- a/exe-unit/components/gsb-http-proxy/src/headers.rs +++ b/exe-unit/components/gsb-http-proxy/src/headers.rs @@ -84,12 +84,10 @@ mod tests { fn test_headers_new_not_filtered() { let hm = mock_headers(); - let result = Headers::new().filter(&hm); + let mut result = Headers::new().filter(&hm).into_keys().collect::>(); + result.sort(); - assert_eq!( - result.into_keys().collect::>(), - vec!["header-1", "host"] - ); + assert_eq!(result, vec!["header-1", "host"]); } #[test]