Github user ifilonenko commented on a diff in the pull request: https://github.com/apache/spark/pull/19045#discussion_r220672041 --- Diff: resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/DecommissionSuite.scala --- @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.spark.deploy.k8s.integrationtest + +import scala.collection.JavaConverters._ + +import io.fabric8.kubernetes.api.model.{Pod, SecretBuilder} +import org.apache.commons.codec.binary.Base64 +import org.apache.commons.io.output.ByteArrayOutputStream +import org.scalatest.concurrent.Eventually + +import org.apache.spark.deploy.k8s.integrationtest.KubernetesSuite._ + +private[spark] trait DecommissionSuite { k8sSuite: KubernetesSuite => + + test("Run SparkPi with env and mount secrets.", k8sTestTag) { --- End diff -- Based on our discussions offline regarding an integration test for decommissioning: A sound integration test would be running a SparkApplication that has the driver hang for a time < TIMEOUT, whilst launching an executor. A watcher for the executor will also be launched before the application is run, so that upon the receiving of a `Action.ADDED` message the `kubernetesClient` will promptly delete the said executor thereby triggering a `WorkerDecommission` Message to be sent to the Driver. The Driver should therefore print the decommission message so that the test can look for that message in the Driver logs, thereby verifying the success of this patch.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org