Skip to content

[SPARK-54835][SQL][TESTS][FOLLOWUP] Drain listener bus before registering listener in test#54397

Closed
cloud-fan wants to merge 1 commit intoapache:masterfrom
cloud-fan:SPARK-54835-followup
Closed

[SPARK-54835][SQL][TESTS][FOLLOWUP] Drain listener bus before registering listener in test#54397
cloud-fan wants to merge 1 commit intoapache:masterfrom
cloud-fan:SPARK-54835-followup

Conversation

@cloud-fan
Copy link
Contributor

What changes were proposed in this pull request?

This is a followup to #53596. In the test "CTAS/RTAS should trigger two query executions", we drain the listener bus before registering the QueryExecutionListener, to avoid events from other tests breaking this test with unexpected executionCount increments.

Why are the changes needed?

Without draining the listener bus first, pending events from previous tests could fire after the listener is registered, causing flaky test failures. Other test suites follow this same pattern.

Does this PR introduce any user-facing change?

No. Test-only change.

How was this patch tested?

Existing test.

Was this patch authored or co-authored using generative AI tooling?

Yes.

Made with Cursor

…stener in test

Drain the listener bus before registering the QueryExecutionListener to avoid events from other tests causing flaky failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cloud-fan
Copy link
Contributor Author

@pan3793 @zhengruifeng

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-54835][SQL][FOLLOWUP] Drain listener bus before registering listener in test [SPARK-54835][SQL][TESTS][FOLLOWUP] Drain listener bus before registering listener in test Feb 20, 2026
@dongjoon-hyun
Copy link
Member

Merged to master.

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.

3 participants

Comments