#!/bin/bash set -e # Configuration API_URL="http://localhost:8080" TIMEOUT_DURATION="2s" # Short timeout for testing echo "🚀 Starting verification of Context Timeouts (MOD-P1-009)..." # 1. Start the server with a short timeout echo " - Starting server with HANDLER_TIMEOUT=$TIMEOUT_DURATION..." export HANDLER_TIMEOUT=$TIMEOUT_DURATION export APP_ENV=development # We need to run the server in the background # Creating a temporary test handler if needed, but for now we rely on existing endpoints # or we can create a specific test endpoint in a Go test file which is cleaner. # BETTER APPROACH: Use Go Test for verification echo " - Running Go integration test for timeout..." cat > internal/middleware/timeout_integration_test.go <