run_stress_tests.sh 871 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # Stress Test Runner for SeaweedFS S3 IAM
  3. set -e
  4. # Colors
  5. GREEN='\033[0;32m'
  6. YELLOW='\033[1;33m'
  7. RED='\033[0;31m'
  8. NC='\033[0m'
  9. echo -e "${YELLOW}💪 Running S3 IAM Stress Tests${NC}"
  10. # Enable stress tests
  11. export ENABLE_STRESS_TESTS=true
  12. export TEST_TIMEOUT=60m
  13. # Run stress tests multiple times
  14. STRESS_ITERATIONS=5
  15. echo -e "${YELLOW}🔄 Running stress tests with $STRESS_ITERATIONS iterations...${NC}"
  16. for i in $(seq 1 $STRESS_ITERATIONS); do
  17. echo -e "${YELLOW}📊 Iteration $i/$STRESS_ITERATIONS${NC}"
  18. if ! go test -v -timeout=$TEST_TIMEOUT -run "TestS3IAMDistributedTests.*concurrent" ./... -count=1; then
  19. echo -e "${RED}❌ Stress test failed on iteration $i${NC}"
  20. exit 1
  21. fi
  22. # Brief pause between iterations
  23. sleep 2
  24. done
  25. echo -e "${GREEN}✅ All stress test iterations completed successfully${NC}"