remove hit limit test

This commit is contained in:
bitfl0wer 2024-01-24 18:51:10 +01:00
parent 3ffb124cd4
commit e073ff26c4
No known key found for this signature in database
GPG Key ID: 0ACD574FCF5226CF
1 changed files with 0 additions and 21 deletions

View File

@ -1,28 +1,7 @@
use chorus::errors::ChorusError;
use chorus::ratelimiter::ChorusRequest; use chorus::ratelimiter::ChorusRequest;
mod common; 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(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)]
#[cfg_attr(not(target_arch = "wasm32"), tokio::test)] #[cfg_attr(not(target_arch = "wasm32"), tokio::test)]
async fn get_limit_config() { async fn get_limit_config() {