From e073ff26c400615274d41868c3c3af0234aa1af4 Mon Sep 17 00:00:00 2001 From: bitfl0wer Date: Wed, 24 Jan 2024 18:51:10 +0100 Subject: [PATCH] remove hit limit test --- tests/ratelimit.rs | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/ratelimit.rs b/tests/ratelimit.rs index 922857b..8843ed0 100644 --- a/tests/ratelimit.rs +++ b/tests/ratelimit.rs @@ -1,28 +1,7 @@ -use chorus::errors::ChorusError; use chorus::ratelimiter::ChorusRequest; mod common; -#[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)] -#[cfg_attr(not(target_arch = "wasm32"), tokio::test)] -async fn hit_ratelimit() { - let mut bundle = common::setup().await; - let mut _count = 0; - let guild = bundle.guild.read().unwrap().clone(); - while _count < 1000 { - _count += 1; - match guild.channels(&mut bundle.user).await { - Err(ChorusError::RateLimited { bucket: _ }) => { - return; - } - Err(_) => panic!("Hit different rate limit"), - _ => continue, - } - } - common::teardown(bundle).await; - panic!("Ratelimit never triggered"); -} - #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)] #[cfg_attr(not(target_arch = "wasm32"), tokio::test)] async fn get_limit_config() {