Skip to content

Commit 2fb3d4c

Browse files
committed
add cooldown time before running rate limmiting tests
1 parent bb16e24 commit 2fb3d4c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

e2e/test_claim_token_api.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const options = {
1212
vus: 1,
1313
iterations: 1,
1414
thresholds: {
15-
'checks': ['rate>=1.0'], // 100% of checks MUST pass
15+
'checks': ['rate>=1.0'],
1616
'http_req_duration': ['p(95)<5000'],
1717
},
1818
};
@@ -91,6 +91,7 @@ function testRateLimiting() {
9191
console.log('\n📊 Testing Faucet-Specific Rate Limiting...');
9292
console.log('📝 Pattern: One success per faucet → All addresses for that faucet get rate limited');
9393

94+
sleep(65) // Wait in case there is already a cooldown time
9495
TEST_SCENARIOS.RATE_LIMIT_TEST_COOLDOWN_CASES.forEach(testCase => {
9596
const response = makeClaimRequest(testCase.faucet_info, testCase.address);
9697

@@ -111,7 +112,7 @@ function testRateLimiting() {
111112
console.log(`❌ ${testCase.name}: Expected ${testCase.expectedStatus}, got ${response.status} - ${response.body}`);
112113
}
113114

114-
sleep(0.1);
115+
sleep(0.5);
115116
});
116117
}
117118

0 commit comments

Comments
 (0)