Commit 5ac42e2
[SPARK-50534][SPARK-50535][TEST][CONNECT] Fix sporadic test failures
### What changes were proposed in this pull request?
Fix sporadic Spark Connect test failures.
1. SPARK-50534: VerifyEvents.this.listener.executeHolder was not declared "volatile", causing the thread to repeatedly read potentially outdated value. The data structure is only used by the test suite.
2. SPARK-50535: org.apache.spark.sql.connect.service.SparkConnectSessionManager.invalidateAllSessions is susceptible to system time synchronization (e.g., NTP), leaving stale sessions. invalidateAllSessions is only used by test suites.
### Why are the changes needed?
Fix sporadic test failures.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Repeatedly ran testOnly org.apache.spark.sql.connect.planner.SparkConnectServiceSuite and org.apache.spark.sql.connect.service.SparkConnectServiceE2ESuite.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #49253 from changgyoopark-db/SPARK-50534.
Authored-by: changgyoopark-db <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>1 parent 827d2a0 commit 5ac42e2
File tree
2 files changed
+6
-3
lines changed- sql/connect/server/src
- main/scala/org/apache/spark/sql/connect/service
- test/scala/org/apache/spark/sql/connect/planner
2 files changed
+6
-3
lines changedLines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
922 | | - | |
| 922 | + | |
| 923 | + | |
923 | 924 | | |
924 | 925 | | |
925 | 926 | | |
| |||
0 commit comments