You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-51768][SS][TESTS] Create Failure Injection Test for Streaming offset and commit log write failures
### What changes were proposed in this pull request?
Add unit test to verify stream query works as expected when writing to commit or offset log fails. And minor improvements to existing test code.
### Why are the changes needed?
Improve testing
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Run this existing test
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes#50559 from siying/commit_offset_failure.
Lead-authored-by: Siying Dong <dong.sy@gmail.com>
Co-authored-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
Signed-off-by: Jungtaek Lim <kabhwan.opensource@gmail.com>
Copy file name to clipboardExpand all lines: sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/FailureInjectionCheckpointFileManager.scala
+7-1
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,8 @@ class DelayCloseFSDataOutputStreamWrapper(
58
58
* Used in unit tests to simulate failure scenarios.
59
59
* This can be put into SQLConf.STREAMING_CHECKPOINT_FILE_MANAGER_CLASS to provide failure
60
60
* injection behavior.
61
+
* Requirement: when this file manager is created, `path` should already be registered using
Copy file name to clipboardExpand all lines: sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/RocksDBCheckpointFailureInjectionSuite.scala
+89-11
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ class RocksDBCheckpointFailureInjectionSuite extends StreamTest
0 commit comments