- Launch wiremock container with pre-configured long-responding endpoint:
docker run -it --rm \
-p 8080:8080 \
--name wiremock \
-v ./wiremock:/home/wiremock \
wiremock/wiremock:3.9.1
- Build and launch the app:
./gradlew bootRun
- Execute cURL request with timeout to simulate request cancellation:
curl --location --request POST 'http://localhost:8876/test' -m 1
- Query metrics and observe http_client_requests_active_seconds_count having value > 0:
curl --location 'http://localhost:8876/management/prometheus' | grep 'http_client_requests_active_seconds_count'