Skip to content

Commit 98e3673

Browse files
Ubuntudongjoon-hyun
authored andcommitted
[SPARK-54063][SS][FOLLOWUP] Remove withTempDirFix from forceSnapshot metric populated when shouldForceSnapshotOnCommit is true test
### What changes were proposed in this pull request? Remove `withTempDir` in `test("SPARK-54063: forceSnapshot metric populated when shouldForceSnapshotOnCommit is true")` because it breaks RocksDB UI Backend CI by causing a timeout https://github.com/apache/spark/actions/runs/19527445536/job/55950300126 ### Why are the changes needed? See above ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? No ### Was this patch authored or co-authored using generative AI tooling? No Closes #53141 from zifeif2/fix-trigger-test. Authored-by: Ubuntu <zifei.feng@your.hostname.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 8cab074 commit 98e3673

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/StateStoreSuite.scala

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2736,19 +2736,17 @@ abstract class StateStoreSuiteBase[ProviderClass <: StateStoreProvider]
27362736
}
27372737

27382738
test("SPARK-54063: forceSnapshot metric populated when shouldForceSnapshotOnCommit is true") {
2739-
withTempDir { dir =>
2740-
tryWithProviderResource(newStoreProvider()) { provider =>
2741-
val store = provider.getStore(0, forceSnapshotOnCommit = true)
2742-
put(store, "a", 0, 1)
2743-
store.commit()
2744-
// Verify that a snapshot file was created for version 1
2745-
val metricPair = store.metrics.customMetrics.find { case (metric, _) =>
2746-
metric.name.contains("rocksdbForceSnapshotCount") ||
2747-
metric.name.contains("forceSnapshotCount")
2748-
}
2749-
assert(metricPair.isDefined)
2750-
assert(metricPair.get._2 == 1L, s"forceSnapshot should be 1 but was ${metricPair.get._2}")
2739+
tryWithProviderResource(newStoreProvider()) { provider =>
2740+
val store = provider.getStore(0, forceSnapshotOnCommit = true)
2741+
put(store, "a", 0, 1)
2742+
store.commit()
2743+
// Verify that a snapshot file was created for version 1
2744+
val metricPair = store.metrics.customMetrics.find { case (metric, _) =>
2745+
metric.name.contains("rocksdbForceSnapshotCount") ||
2746+
metric.name.contains("forceSnapshotCount")
27512747
}
2748+
assert(metricPair.isDefined)
2749+
assert(metricPair.get._2 == 1L, s"forceSnapshot should be 1 but was ${metricPair.get._2}")
27522750
}
27532751
}
27542752

0 commit comments

Comments
 (0)