ulysses-you commented on code in PR #2359:
URL: https://github.com/apache/incubator-kyuubi/pull/2359#discussion_r850079586
##########
integration-tests/kyuubi-kubernetes-it/src/test/scala/org/apache/kyuubi/kubernetes/test/deployment/KyuubiOnKubernetesTestsSuite.scala:
##########
@@ -31,34 +31,11 @@ import org.apache.kyuubi.operation.SparkQueryTests
* | | | |
* ------------ -----------------------------------------------------
*/
-class KyuubiOnKubernetesTestsSuite extends SparkQueryTests with Logging {
- private lazy val _jdbcUrl: String = {
- val kubernetesclient = MiniKube.getKubernetesClient
- val kyuubiServers =
- kubernetesclient
- .pods()
- .list()
- .getItems
- assert(kyuubiServers.size() == 1)
- val kyuubiServer = kyuubiServers.get(0)
- // Kyuubi server state should be running since mvn compile is quite
slowly..
- if (!"running".equalsIgnoreCase(kyuubiServer.getStatus.getPhase)) {
- val log =
- kubernetesclient
- .pods()
- .withName(kyuubiServer.getMetadata.getName)
- .getLog
- throw new IllegalStateException(
- s"Kyuubi server pod state error: ${kyuubiServer.getStatus.getPhase},
log:\n$log")
- }
- val kyuubiServerIp = MiniKube.getIp
- val kyuubiServerPort =
- kyuubiServer.getSpec.getContainers.get(0).getPorts.get(0).getHostPort
- s"jdbc:hive2://$kyuubiServerIp:$kyuubiServerPort/;"
- }
+class KyuubiOnKubernetesTestsSuite extends WithKyuubiServerOnKubernetes with
SparkQueryTests {
+ override protected val kyuubiServerConf: KyuubiConf = KyuubiConf()
+ override protected val connectionConf: Map[String, String] = Map(
+ "spark.master" -> "local",
+ "spark.executor.instances" -> "1")
- override protected def jdbcUrl: String = {
- assert(_jdbcUrl != null, "Failed to get Kyuubi server")
- _jdbcUrl
- }
+ override protected def jdbcUrl: String = getJdbcUrl
Review Comment:
let's override it in parent class
--
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]