This is an automated email from the ASF dual-hosted git repository.
dongjoon-hyun pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.x by this push:
new 8cadba02d548 [SPARK-57883][CORE][TEST] Fix `PluginContainerSuite` to
check executor memory correctly
8cadba02d548 is described below
commit 8cadba02d548ec9c42b6c0310083e0da703dc9c4
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Jul 2 09:44:28 2026 -0700
[SPARK-57883][CORE][TEST] Fix `PluginContainerSuite` to check executor
memory correctly
### What changes were proposed in this pull request?
This PR aims to fix `PluginContainerSuite` to check executor memory
correctly.
### Why are the changes needed?
Previously, it checks `driver` accidentally because it didn't filter out
driver from the executor list.
https://github.com/apache/spark/blob/e3e6d9eb31012244692c043eb92a582ae3c3751b/core/src/test/scala/org/apache/spark/internal/plugin/PluginContainerSuite.scala#L261-L263
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #56964 from dongjoon-hyun/SPARK-57883.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 17e7e1479eadcdc3a97e06e3b69127576df17412)
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../org/apache/spark/internal/plugin/PluginContainerSuite.scala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/core/src/test/scala/org/apache/spark/internal/plugin/PluginContainerSuite.scala
b/core/src/test/scala/org/apache/spark/internal/plugin/PluginContainerSuite.scala
index fa7f1238bcfd..700a17649b76 100644
---
a/core/src/test/scala/org/apache/spark/internal/plugin/PluginContainerSuite.scala
+++
b/core/src/test/scala/org/apache/spark/internal/plugin/PluginContainerSuite.scala
@@ -259,8 +259,12 @@ class PluginContainerSuite extends SparkFunSuite with
LocalSparkContext {
TestUtils.waitUntilExecutorsUp(sc, 1, 60000)
// Check executor memory is also updated
- val execInfo = sc.statusTracker.getExecutorInfos.head
- assert(execInfo.totalOffHeapStorageMemory() ==
MemoryOverridePlugin.offHeapMemory)
+ eventually(timeout(10.seconds), interval(100.milliseconds)) {
+ val execs = sc.statusStore.executorList(true).filter(_.id !=
SparkContext.DRIVER_IDENTIFIER)
+ assert(execs.nonEmpty)
+ assert(execs.forall(_.memoryMetrics.exists(
+ _.totalOffHeapStorageMemory == MemoryOverridePlugin.offHeapMemory)))
+ }
} finally {
if (sc != null) {
sc.stop()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]