Skip to content

Commit 03304e1

Browse files
committed
minor edit
1 parent df3e56b commit 03304e1

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

core/src/test/scala/org/apache/spark/status/AppStatusStoreSuite.scala

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ class AppStatusStoreSuite extends SparkFunSuite {
9292
}
9393
}
9494

95-
test("SPARK-28638: only successful tasks have taskSummary when with disk kvstore (LevelDB)") {
95+
test("SPARK-26260: only successful tasks have taskSummary when with disk kvstore (LevelDB)") {
9696
val testDir = Utils.createTempDir()
97-
val store = KVUtils.open(testDir, getClass().getName())
97+
val diskStore = KVUtils.open(testDir, getClass().getName())
9898

99-
(0 until 5).foreach { i => store.write(newTaskData(i, status = "FAILED")) }
100-
Seq(new AppStatusStore(store)).foreach { appStore =>
99+
(0 until 5).foreach { i => diskStore.write(newTaskData(i, status = "FAILED")) }
100+
Seq(new AppStatusStore(diskStore)).foreach { appStore =>
101101
val summary = appStore.taskSummary(stageId, attemptId, uiQuantiles)
102102
assert(summary.size === 0)
103103
}
@@ -126,21 +126,19 @@ class AppStatusStoreSuite extends SparkFunSuite {
126126
}
127127
}
128128

129-
test("summary should contain successful tasks only when with disk kvstore (LevelDB)") {
130-
129+
test("SPARK-26260: summary should contain successful tasks only when with LevelDB store") {
131130
val testDir = Utils.createTempDir()
132-
133-
val store = KVUtils.open(testDir, getClass().getName())
131+
val diskStore = KVUtils.open(testDir, getClass().getName())
134132

135133
for (i <- 0 to 5) {
136134
if (i % 2 == 1) {
137-
store.write(newTaskData(i, status = "FAILED"))
135+
diskStore.write(newTaskData(i, status = "FAILED"))
138136
} else {
139-
store.write(newTaskData(i))
137+
diskStore.write(newTaskData(i))
140138
}
141139
}
142140

143-
Seq(new AppStatusStore(store)).foreach { appStore =>
141+
Seq(new AppStatusStore(diskStore)).foreach { appStore =>
144142
val summary = appStore.taskSummary(stageId, attemptId, uiQuantiles).get
145143

146144
val values = Array(0.0, 2.0, 4.0)
@@ -150,7 +148,7 @@ class AppStatusStoreSuite extends SparkFunSuite {
150148
assert(expected === actual)
151149
}
152150
}
153-
store.close()
151+
diskStore.close()
154152
Utils.deleteRecursively(testDir)
155153
}
156154

0 commit comments

Comments
 (0)