Package: release.debian.org Severity: normal Tags: bullseye User: release.debian....@packages.debian.org Usertags: pu X-Debbugs-Cc: golang-github-prometheus-exporter-tool...@packages.debian.org, Santiago Vila <sanv...@debian.org> Control: affects -1 + src:golang-github-prometheus-exporter-toolkit
[ Reason ] This package is currently FTBFS on stable due to flaky tests. [ Impact ] No impact for users. [ Tests ] Santiago Vila has manually tested this issue and fix extensively, documented in the original bug report (#1013578). [ Risks ] No risks, this just adds delays in tests. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Changes ] Just a couple of calls to time.Sleep(), plus updated Uploaders field in debian/control.
diff -Nru golang-github-prometheus-exporter-toolkit-0.5.1/debian/changelog golang-github-prometheus-exporter-toolkit-0.5.1/debian/changelog --- golang-github-prometheus-exporter-toolkit-0.5.1/debian/changelog 2021-01-25 14:10:41.000000000 +0000 +++ golang-github-prometheus-exporter-toolkit-0.5.1/debian/changelog 2022-12-15 22:33:17.000000000 +0000 @@ -1,3 +1,10 @@ +golang-github-prometheus-exporter-toolkit (0.5.1-2+deb11u1) bullseye; urgency=medium + + * Patch tests to avoid race condition. Closes: #1013578. + Thanks to Santiago Vila for the adjusted patch. + + -- Martina Ferrari <t...@debian.org> Thu, 15 Dec 2022 22:33:17 +0000 + golang-github-prometheus-exporter-toolkit (0.5.1-2) unstable; urgency=medium * Team upload. diff -Nru golang-github-prometheus-exporter-toolkit-0.5.1/debian/control golang-github-prometheus-exporter-toolkit-0.5.1/debian/control --- golang-github-prometheus-exporter-toolkit-0.5.1/debian/control 2021-01-19 14:44:59.000000000 +0000 +++ golang-github-prometheus-exporter-toolkit-0.5.1/debian/control 2022-12-15 22:33:17.000000000 +0000 @@ -1,6 +1,7 @@ Source: golang-github-prometheus-exporter-toolkit Maintainer: Debian Go Packaging Team <team+pkg...@tracker.debian.org> -Uploaders: Daniel Swarbrick <daniel.swarbr...@cloud.ionos.com> +Uploaders: Daniel Swarbrick <dswarbr...@debian.org>, + Martina Ferrari <t...@debian.org>, Section: devel Testsuite: autopkgtest-pkg-go Priority: optional diff -Nru golang-github-prometheus-exporter-toolkit-0.5.1/debian/patches/02-Avoid_race_in_test.patch golang-github-prometheus-exporter-toolkit-0.5.1/debian/patches/02-Avoid_race_in_test.patch --- golang-github-prometheus-exporter-toolkit-0.5.1/debian/patches/02-Avoid_race_in_test.patch 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-prometheus-exporter-toolkit-0.5.1/debian/patches/02-Avoid_race_in_test.patch 2022-12-15 22:33:17.000000000 +0000 @@ -0,0 +1,31 @@ +Author: Martina Ferrari <t...@debian.org> +Description: Fix test failures due to race conditions +Forwarded: https://github.com/prometheus/exporter-toolkit/issues/108 +Last-Updated: Mon, 29 Aug 2022 17:39:56 +0000 + +--- a/web/users_test.go ++++ b/web/users_test.go +@@ -18,6 +18,7 @@ + "net/http" + "sync" + "testing" ++ "time" + ) + + // TestBasicAuthCache validates that the cache is working by calling a password +@@ -42,6 +43,7 @@ + ListenAndServe(server, "testdata/tls_config_users_noTLS.good.yml", testlogger) + close(done) + }() ++ time.Sleep(250 * time.Millisecond) + + login := func(username, password string, code int) { + client := &http.Client{} +@@ -106,6 +108,7 @@ + ListenAndServe(server, "testdata/tls_config_users_noTLS.good.yml", testlogger) + close(done) + }() ++ time.Sleep(250 * time.Millisecond) + + login := func() { + client := &http.Client{} diff -Nru golang-github-prometheus-exporter-toolkit-0.5.1/debian/patches/series golang-github-prometheus-exporter-toolkit-0.5.1/debian/patches/series --- golang-github-prometheus-exporter-toolkit-0.5.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ golang-github-prometheus-exporter-toolkit-0.5.1/debian/patches/series 2022-12-15 22:33:17.000000000 +0000 @@ -0,0 +1 @@ +02-Avoid_race_in_test.patch