some tests

This commit is contained in:
Kent Yao 2020-10-20 18:26:12 +08:00
parent 0849678453
commit 6e88ce9ef7
2 changed files with 10 additions and 0 deletions

View File

@ -120,5 +120,7 @@ class UtilsSuite extends KyuubiFunSuite {
Utils.majorMinorVersion(KYUUBI_VERSION)._2)
assert(Utils.shortVersion(KYUUBI_VERSION) ===
KYUUBI_VERSION.stripSuffix("-SNAPSHOT"))
intercept[IllegalArgumentException](Utils.shortVersion("-" + KYUUBI_VERSION))
intercept[IllegalArgumentException](Utils.majorMinorVersion("-" + KYUUBI_VERSION))
}
}

View File

@ -86,4 +86,12 @@ class KyuubiConfSuite extends KyuubiFunSuite {
assert(cloned.getOption(key).get === "xyz")
}
test("to spark prefixed conf") {
val conf = KyuubiConf(false)
assert(conf.toSparkPrefixedConf.isEmpty)
assert(conf.set("kyuubi.kent", "yao").toSparkPrefixedConf.get("spark.kyuubi.kent") ===
Some("yao"))
}
}