Commit eb2adde
[SPARK-54835][SQL][TESTS][FOLLOWUP] Drain listener bus before registering listener in test
### 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](https://cursor.com)
Closes #54397 from cloud-fan/SPARK-54835-followup.
Authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>1 parent 89aafe6 commit eb2adde
File tree
1 file changed
+2
-0
lines changed- sql/core/src/test/scala/org/apache/spark/sql/connector
1 file changed
+2
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2155 | 2155 | | |
2156 | 2156 | | |
2157 | 2157 | | |
| 2158 | + | |
| 2159 | + | |
2158 | 2160 | | |
2159 | 2161 | | |
2160 | 2162 | | |
| |||
0 commit comments