You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "zwangsheng (via GitHub)" <gi...@apache.org> on 2023/06/05 02:07:56 UTC

[GitHub] [incubator-celeborn] zwangsheng commented on a diff in pull request #1484: [CELEBORN-105][TEST] Kubernetes Integration Test

zwangsheng commented on code in PR #1484:
URL: https://github.com/apache/incubator-celeborn/pull/1484#discussion_r1217353968


##########
tests/kubernetes-it/src/test/scala/org.apache.celeborn.integration/DeploySuite.scala:
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.celeborn.integration
+
+import scala.language.postfixOps
+
+import org.scalatest.concurrent.Eventually.eventually
+import org.scalatest.concurrent.Waiters.{interval, timeout}
+import org.scalatest.time.SpanSugar.convertIntToGrainOfTime
+
+import org.apache.celeborn.CelebornFunSuite
+import org.apache.celeborn.client.WithShuffleClientSuite
+
+//TODO need add shuffle client test
+class DeploySuite extends CelebornFunSuite with WithMiniKube {
+  final val masterStatefulSet =
+    kubernetesClient.apps().statefulSets().withName("celeborn-master").get()
+  assert(masterStatefulSet != null)
+  final val workerStatefulSet =
+    kubernetesClient.apps().statefulSets().withName("celeborn-worker").get()
+  assert(workerStatefulSet != null)
+
+  test("Check master started") {
+    val masterPod = kubernetesClient.pods().withName("celeborn-master-0")
+    // wait master start
+    eventually(timeout(5 minutes), interval(30 seconds)) {
+      val log =
+        masterPod.getLog(true)
+      assert(log.contains("Master started."))
+    }
+
+    assert(masterPod.get().getStatus.getPhase == "Running")
+  }
+
+  test("Check worker started") {
+    val workerPod = kubernetesClient.pods().withName("celeborn-worker-0")
+    // wait worker start
+    eventually(timeout(5 minutes), interval(30 seconds)) {
+      val log =
+        workerPod.getLog(true)

Review Comment:
   For now, `Master\Worker started.`, this type of log is the bottom log of start service and before `rpcEnv.awaitTermination()`.
   
   Maybe this is enough for simple judge Master\Worker Started.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org