pan3793 commented on code in PR #3869:
URL: https://github.com/apache/incubator-kyuubi/pull/3869#discussion_r1039496669
##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/WithKyuubiServerOnKubernetes.scala:
##########
@@ -17,34 +17,37 @@
package org.apache.kyuubi.kubernetes.test
+import io.fabric8.kubernetes.api.model.Pod
import io.fabric8.kubernetes.client.DefaultKubernetesClient
import org.apache.kyuubi.KyuubiFunSuite
trait WithKyuubiServerOnKubernetes extends KyuubiFunSuite {
protected def connectionConf: Map[String, String] = Map.empty
private val miniKubernetesClient: DefaultKubernetesClient =
MiniKube.getKubernetesClient
+ lazy val kyuubiPod: Pod =
miniKubernetesClient.pods().withName("kyuubi-test").get()
- protected def getJdbcUrl: String = {
- val kyuubiServers =
- miniKubernetesClient.pods().list().getItems
- assert(kyuubiServers.size() == 1)
- val kyuubiServer = kyuubiServers.get(0)
+ protected def getJdbcUrl(connectionConf: Map[String, String]): String = {
// Kyuubi server state should be running since mvn compile is quite
slowly..
- if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
+ if (!"running".equalsIgnoreCase(kyuubiPod.getStatus.getPhase)) {
val log =
miniKubernetesClient
.pods()
- .withName(kyuubiServer.getMetadata.getName)
+ .withName(kyuubiPod.getMetadata.getName)
.getLog
throw new IllegalStateException(
- s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase},
log:\n$log")
+ s"Kyuubi server pod state error: ${kyuubiPod.getStatus.getPhase},
log:\n$log")
}
- val kyuubiServerIp = MiniKube.getIp
+ val kyuubiServerIp = miniKubeIp
Review Comment:
ditto w/ kyuubiPod
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]