Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
turboFei committed Feb 20, 2023
1 parent cf8acd5 commit efd934c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import scala.collection.JavaConverters._
import org.apache.hive.service.rpc.thrift._
import org.scalatest.time.SpanSugar.convertIntToGrainOfTime

import org.apache.kyuubi.WithKyuubiServer
import org.apache.kyuubi.config.KyuubiConf
import org.apache.kyuubi.{KYUUBI_VERSION, WithKyuubiServer}
import org.apache.kyuubi.config.{KyuubiConf, KyuubiReservedKeys}
import org.apache.kyuubi.config.KyuubiConf.SESSION_CONF_ADVISOR
import org.apache.kyuubi.engine.ApplicationState
import org.apache.kyuubi.jdbc.KyuubiHiveDriver
Expand Down Expand Up @@ -272,6 +272,14 @@ class KyuubiOperationPerConnectionSuite extends WithKyuubiServer with HiveJDBCTe
assert(MetricsSystem.counterValue(connFailedMetric).getOrElse(0L) > connFailedCount)
}
}

test("support to transfer client version when opening jdbc connection") {
withJdbcStatement() { stmt =>
val rs = stmt.executeQuery(s"set spark.${KyuubiReservedKeys.KYUUBI_CLIENT_VERSION_KEY}")
assert(rs.next())
assert(rs.getString(2) === KYUUBI_VERSION)
}
}
}

class TestSessionConfAdvisor extends SessionConfAdvisor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import org.apache.hive.service.rpc.thrift.{TExecuteStatementReq, TGetInfoReq, TG
import org.scalatest.time.SpanSugar._

import org.apache.kyuubi.{KYUUBI_VERSION, Utils, WithKyuubiServer, WithSimpleDFSService}
import org.apache.kyuubi.config.{KyuubiConf, KyuubiReservedKeys}
import org.apache.kyuubi.config.KyuubiConf
import org.apache.kyuubi.config.KyuubiConf.KYUUBI_ENGINE_ENV_PREFIX
import org.apache.kyuubi.engine.SemanticVersion
import org.apache.kyuubi.jdbc.hive.KyuubiStatement
Expand Down Expand Up @@ -364,12 +364,4 @@ class KyuubiOperationPerUserSuite
val snapshot = MetricsSystem.histogramSnapshot(metric).get
assert(snapshot.getMax > 0 && snapshot.getMedian > 0)
}

test("support to transfer client version when opening jdbc connection") {
withJdbcStatement() { stmt =>
val rs = stmt.executeQuery(s"set spark.${KyuubiReservedKeys.KYUUBI_CLIENT_VERSION_KEY}")
assert(rs.next())
assert(rs.getString(2) == KYUUBI_VERSION)
}
}
}

0 comments on commit efd934c

Please sign in to comment.