Skip to content

[Fix][E2E] Fix flaky CI failure in KingbaseDialectContainerTest#10674

Merged
Carl-Zhou-CN merged 1 commit intoapache:devfrom
dybyte:fix/kingbase-npe
Apr 2, 2026
Merged

[Fix][E2E] Fix flaky CI failure in KingbaseDialectContainerTest#10674
Carl-Zhou-CN merged 1 commit intoapache:devfrom
dybyte:fix/kingbase-npe

Conversation

@dybyte
Copy link
Copy Markdown
Contributor

@dybyte dybyte commented Mar 30, 2026

Purpose of this pull request

KingbaseDialectContainerTest were occasionally failing with NullPointerException in CI.

The previous test structure relied on shared static state and reused JDBC connections across test execution, which made the tests sensitive to lifecycle ordering and shared resource state.

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@LeonYoah
Copy link
Copy Markdown
Collaborator

I still see the same intermittent NPE in CI. My guess is that the CI runner is more timing-sensitive, so although the Kingbase container port is already open, the database itself is not yet fully ready to execute SQL. In that case, the test starts its initialization too early and occasionally fails. We may need an extra readiness check after container startup, and only expose the connection / continue with downstream test setup once the database can actually execute SQL successfully.

@dybyte dybyte force-pushed the fix/kingbase-npe branch from 8ca3c16 to 3abb02d Compare March 31, 2026 04:52
@dybyte dybyte force-pushed the fix/kingbase-npe branch from 3abb02d to 6185426 Compare March 31, 2026 05:17
@dybyte dybyte marked this pull request as ready for review March 31, 2026 06:38
@dybyte
Copy link
Copy Markdown
Contributor Author

dybyte commented Mar 31, 2026

I still see the same intermittent NPE in CI. My guess is that the CI runner is more timing-sensitive, so although the Kingbase container port is already open, the database itself is not yet fully ready to execute SQL. In that case, the test starts its initialization too early and occasionally fails. We may need an extra readiness check after container startup, and only expose the connection / continue with downstream test setup once the database can actually execute SQL successfully.

Thanks, this was very helpful!
I’ve added a SQL readiness check to address this.

@LeonYoah
Copy link
Copy Markdown
Collaborator

@chl-wxp

Copy link
Copy Markdown
Collaborator

@LeonYoah LeonYoah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dybyte dybyte requested review from corgy-w and davidzollo March 31, 2026 13:55
Copy link
Copy Markdown
Contributor

@davidzollo davidzollo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
Good job

Copy link
Copy Markdown
Member

@Carl-Zhou-CN Carl-Zhou-CN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@Carl-Zhou-CN Carl-Zhou-CN merged commit b7a0fc5 into apache:dev Apr 2, 2026
7 of 8 checks passed
davidzollo pushed a commit to davidzollo/seatunnel that referenced this pull request Apr 7, 2026
onceMisery pushed a commit to onceMisery/seatunnel that referenced this pull request Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants