Skip to content

Fix Http2ClientReconnectTest timeout issue in vertx4 module - #2955

Closed
velo wants to merge 0 commit into
masterfrom
fix/vertx-http2-client-reconnect-test-timeout
Closed

Fix Http2ClientReconnectTest timeout issue in vertx4 module#2955
velo wants to merge 0 commit into
masterfrom
fix/vertx-http2-client-reconnect-test-timeout

Conversation

@velo

@velo velo commented Jul 18, 2025

Copy link
Copy Markdown
Member

Summary

Fixes the unstable timeout issue in Http2ClientReconnectTest.allRequestsShouldBeAnswered() that was causing test failures after 30 seconds.

Root Cause

The test was timing out because the asynchronous Future chain was not properly handled by the VertxTestContext. The specific issues were:

  1. Incorrect Future composition: Used CompositeFuture.all(List<Future>) instead of Future.all(List<Future<?>>)
  2. Missing test context completion: The Future chain was created but not properly attached to the test context
  3. No error handling: Failed async operations weren't being reported to the test context

Changes Made

  • Changed CompositeFuture.all(List<Future>) to Future.all(List<Future<?>>) in the sendRequests method
  • Added proper .onComplete() handlers to ensure test context receives completion signals
  • Added error handling to call testContext.failNow() when async operations fail
  • Applied the same fix to both test methods: the main test and the nested "After server is available again" test

Test Results

✅ All vertx4 tests now pass consistently (26 tests, 0 failures, 0 errors)
✅ The specific failing test Http2ClientReconnectTest.allRequestsShouldBeAnswered() now completes in ~0.2s instead of timing out after 30s

Test Plan

  • Run the specific failing test: mvn test -pl vertx/feign-vertx4-test -Dtest=Http2ClientReconnectTest
  • Run all vertx4 tests to ensure no regressions: mvn test -pl vertx/feign-vertx4-test
  • Verify test execution time is reasonable (no 30s timeouts)

🤖 Generated with Claude Code

@velo
velo force-pushed the fix/vertx-http2-client-reconnect-test-timeout branch from 94e5306 to 460e099 Compare July 18, 2025 13:24
@velo velo closed this Jul 20, 2025
@velo
velo force-pushed the fix/vertx-http2-client-reconnect-test-timeout branch from 124ec40 to ed7f8a4 Compare July 20, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant