test(athena): allow for floci-duck cold start when polling query state#1910
Open
hampsterx wants to merge 1 commit into
Open
test(athena): allow for floci-duck cold start when polling query state#1910hampsterx wants to merge 1 commit into
hampsterx wants to merge 1 commit into
Conversation
getQueryResults polled for a terminal query state for 10s (20 attempts at 500ms). The first Athena query in a run starts the floci-duck sidecar, so that budget has to cover pulling floci/floci-duck:latest and waiting for its health check before the query itself can run. FlociDuckManager alone allows up to 30s for the health check (HEALTH_POLL_MAX_MS), so 10s could never cover a cold start. A recent CI run pulled the image in 4.1s, reached sidecar health at +10.0s, and succeeded 372ms after the final poll had already given up. Raise the budget to 60s, matching StepFunctionsActivityTest.pollUntilDone, which polls the same way for the same reason. The loop still exits on the first non-RUNNING state, so a warm sidecar returns as quickly as before and only a genuine hang uses the full window. Also make a timeout self-explaining. The failure above surfaced as a bare "expected: SUCCEEDED but was: RUNNING", which gives no hint that the budget ran out rather than the query landing in a wrong state. Fail fast on FAILED with the stateChangeReason, name the execution and the budget in the timeout assertion, and restore the interrupt flag instead of swallowing it.
hampsterx
force-pushed
the
test/athena-query-poll-timeout
branch
from
July 20, 2026 00:10
e57785c to
4e4bcee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AthenaTest.getQueryResultsallowed 10s (20 attempts at 500ms) for a query to reach a terminal state. The first Athena query in a run starts the floci-duck sidecar, so that budget also has to cover pullingfloci/floci-duck:latestand waiting for the health check.FlociDuckManager.HEALTH_POLL_MAX_MSalone permits 30s for health, so 10s could never cover a cold start.StepFunctionsActivityTest.pollUntilDone, which polls the same way for the same reason. The loop still exits on the first non-RUNNING state, so a warm sidecar returns as fast as before and only a genuine hang uses the full window.expected: SUCCEEDED but was: RUNNING, which gives no hint that the budget ran out rather than the query landing in a wrong state. Fail fast onFAILEDwith thestateChangeReason(asDataLakeTestalready does), name the execution and budget in the timeout assertion, and restore the interrupt flag rather than swallowing it (asCloudWatchLogsInsightsTestalready does).No production code changes, and no CI config changes: the lazy cold-start path stays under test rather than being pre-warmed away.
Timeline from the failing run
StartQueryExecution, begins pullingfloci/floci-duck:latestTest plan
mvn test-compileclean forcompatibility-tests/sdk-test-javaAthenaService.startQueryExecution: state isRUNNINGsynchronously, thenSUCCEEDED/FAILEDviavertx.executeBlocking, so the loop exits on either terminal state and the budget change is a tolerance fix, not a masked hangStepFunctionsActivityTest60s,DataLakeTest30s,AppSyncTest10s)native / sdk-test-javagreen in CI