async fn adjust_limit_removes_rate_limiter() {
        let (handles, _) = setup_requester_test(None).await;

        let scan = FeroxScan::default();
        scan.add_error();
        scan.add_error();

        let requester = Requester {
            handles,
            seen_links: RwLock::new(HashSet::<String>::new()),
            tuning_lock: Mutex::new(0),
            ferox_scan: Arc::new(scan),
            target_url: "http://localhost".to_string(),
            rate_limiter: RwLock::new(None),
            policy_data: PolicyData::new(RequesterPolicy::AutoBail, 7),
        };

        requester.policy_data.set_reqs_sec(400);
        requester
            .policy_data
            .remove_limit
            .store(true, Ordering::Relaxed);

        requester
            .adjust_limit(PolicyTrigger::Errors, true)
            .await
            .unwrap();
        assert!(requester.rate_limiter.read().await.is_none());
    }
/// adjust_limit should remove the rate limiter when remove_limit is set
adjust_limit should remove the rate limiter when remove_limit is set
adjust_limit should remove the rate limiter when remove_limit is set
async fn adjust_limit_removes_rate_limiter() {
        let (handles, _) = setup_requester_test(None).await;
        let scan = FeroxScan::default();
        scan.add_error();
        scan.add_error();
        let requester = Requester {
            handles,
            seen_links: RwLock::new(HashSet::<String>::new()),
            tuning_lock: Mutex::new(0),
            ferox_scan: Arc::new(scan),
            target_url: "http://localhost".to_string(),
            rate_limiter: RwLock::new(None),
            policy_data: PolicyData::new(RequesterPolicy::AutoBail, 7),
        };
        requester.policy_data.set_reqs_sec(400);
        requester
            .policy_data
            .remove_limit
            .store(true, Ordering::Relaxed);
        requester
            .adjust_limit(PolicyTrigger::Errors, true)
            .await
            .unwrap();
        assert!(requester.rate_limiter.read().await.is_none());
    }
async fn adjust_limit_removes_rate_limiter ( ) { let ( handles , _ ) = setup_requester_test ( None ) . await ; let scan = FeroxScan :: default ( ) ; scan . add_error ( ) ; scan . add_error ( ) ; let requester = Requester { handles , seen_links : RwLock :: new ( HashSet :: < String > :: new ( ) ) , tuning_lock : Mutex :: new ( 0 ) , ferox_scan : Arc :: new ( scan ) , target_url : " " . to_string ( ) , rate_limiter : RwLock :: new ( None ) , policy_data : PolicyData :: new ( RequesterPolicy :: AutoBail , 7 ) , } ; requester . policy_data . set_reqs_sec ( 400 ) ; requester . policy_data . remove_limit . store ( true , Ordering :: Relaxed ) ; requester . adjust_limit ( PolicyTrigger :: Errors , true ) . await . unwrap ( ) ; assert ! ( requester rate_limiter read ( ) await is_none ( ) ) ; }
adjust_limit should remove the rate limiter when remove_limit is set
adjust_limit should remove the rate limiter when remove_limit is set