aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Polański <michal@polanski.me>2020-06-22 01:50:57 +0200
committerLeo <thinkabit.ukim@gmail.com>2020-06-23 17:04:51 +0000
commitdc2f29704b7877837553be56a809108dd5802a7d (patch)
treea6e1c2cb8abb5e57fb2d4aab1fcd8bebb86b3d33
parent12613e9667a5b4e017170353759bfcb48fb63d6c (diff)
downloadaports-dc2f29704b7877837553be56a809108dd5802a7d.tar.gz
aports-dc2f29704b7877837553be56a809108dd5802a7d.tar.bz2
aports-dc2f29704b7877837553be56a809108dd5802a7d.tar.xz
testing/traefik: allow extra leeway in rate limiting tests
This prevents failing the test suite on the CI
-rw-r--r--testing/traefik/APKBUILD6
-rw-r--r--testing/traefik/rate-limiter-test.patch13
2 files changed, 17 insertions, 2 deletions
diff --git a/testing/traefik/APKBUILD b/testing/traefik/APKBUILD
index 896b3560d9..2cb4288bec 100644
--- a/testing/traefik/APKBUILD
+++ b/testing/traefik/APKBUILD
@@ -17,7 +17,8 @@ options="chmod-clean"
source="$pkgname-$pkgver.tar.gz::https://github.com/containous/traefik/releases/download/v$pkgver/traefik-v$pkgver.src.tar.gz
traefik.initd
traefik.confd
- traefik.toml"
+ traefik.toml
+ rate-limiter-test.patch"
builddir="$srcdir"
export BUILD_TIMESTAMP=$(date -u "+%Y-%m-%dT%TZ" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
@@ -63,4 +64,5 @@ cleanup_srcdir() {
sha512sums="f23a58632cbef5c3326b464f9c85f59f2d29ed799d392da544f66c40113e3f08b504c35867479603c697c4ee660401ae2ac4596288bcb9de348ddbe597dea45c traefik-2.2.1.tar.gz
2fe42052cdb035b202c7c0a1acd5cfe9ed1800ca067f2f5588d54e6ffbdd672d7c46cfd57fcfc219cadaa24d64a0e038a20d092eb1e4c04b67b8eb83c0af74fd traefik.initd
1519c2f446c4bc3af8407eb367a05e5ec0491f28d56d5385b12a550c84606d84e2424aadd5d72e56e628fd1da3f0f194ab3c077e6da85ead75a256f8e8069751 traefik.confd
-7dff62db55362433fe33a69bfb556e6f285a033aaaab46ea970ae4ee1b19a4b0d6b25bf5523d4dc6b40d26922945fd1263ae8e53d295d6bf7f18ea1477a9e4d5 traefik.toml"
+7dff62db55362433fe33a69bfb556e6f285a033aaaab46ea970ae4ee1b19a4b0d6b25bf5523d4dc6b40d26922945fd1263ae8e53d295d6bf7f18ea1477a9e4d5 traefik.toml
+6b6f29fccef961647747b6a77c5b4f201a209e4dca9b21cc346236617076454f89f435bcb7a9f8cac04e3e8dca3b0e717ac5536ea96a283766d1b745eafb68b6 rate-limiter-test.patch"
diff --git a/testing/traefik/rate-limiter-test.patch b/testing/traefik/rate-limiter-test.patch
new file mode 100644
index 0000000000..f53d6b940e
--- /dev/null
+++ b/testing/traefik/rate-limiter-test.patch
@@ -0,0 +1,13 @@
+Upstream: No
+Reason: Allow extra leeway in rate limiting tests to prevent CI errors
+--- a/pkg/middlewares/ratelimiter/rate_limiter_test.go
++++ b/pkg/middlewares/ratelimiter/rate_limiter_test.go
+@@ -304,7 +304,7 @@ func TestRateLimit(t *testing.T) {
+ // we can expect some extra delay in addition to the rate limiting we already do,
+ // so we allow for some extra leeway there.
+ // Feel free to adjust wrt to the load on e.g. the CI.
+- minCount := wantCount * 95 / 100
++ minCount := wantCount * 85 / 100
+ if reqCount < minCount {
+ t.Fatalf("rate was slower than expected: %d requests (wanted > %d) in %v", reqCount, minCount, elapsed)
+ }