Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][SPARK-37359][K8S] Cleanup the Spark Kubernetes Integration tests #34636

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ private[spark] trait DecommissionSuite { k8sSuite: KubernetesSuite =>
mainClass = "",
expectedDriverLogOnCompletion = Seq(
"Finished waiting, stopping Spark",
"Decommission executors",
"Remove reason statistics: (gracefully decommissioned: 1, decommision unfinished: 0, " +
"driver killed: 0, unexpectedly exited: 0)."),
"Decommission executors"),
appArgs = Array.empty[String],
driverPodChecker = doBasicDriverPyPodCheck,
executorPodChecker = checkFirstExecutorPodGetsLabeled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import org.apache.spark.internal.config._
class KubernetesSuite extends SparkFunSuite
with BeforeAndAfterAll with BeforeAndAfter with BasicTestsSuite with SparkConfPropagateSuite
with SecretsTestsSuite with PythonTestsSuite with ClientModeTestsSuite with PodTemplateSuite
with PVTestsSuite with DepsTestsSuite with DecommissionSuite with RTestsSuite with Logging
with PVTestsSuite with DepsTestsSuite with DecommissionSuite with Logging
with Eventually with Matchers {


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,28 @@ private[spark] trait PVTestsSuite { k8sSuite: KubernetesSuite =>
.storageClasses()
.withName(STORAGE_NAME)
.delete()

// Wait for them to be deleted
Eventually.eventually(TIMEOUT, INTERVAL) {
assert(kubernetesTestComponents
.kubernetesClient
.persistentVolumeClaims()
.withName(PVC_NAME)
.get() === null)

assert(kubernetesTestComponents
.kubernetesClient
.persistentVolumes()
.withName(PV_NAME)
.get() === null)

assert(kubernetesTestComponents
.kubernetesClient
.storage()
.storageClasses()
.withName(STORAGE_NAME)
.get() === null)
}
}

private def checkPVs(pod: Pod, file: String) = {
Expand Down