sap1ens commented on a change in pull request #28852:
URL: https://github.com/apache/spark/pull/28852#discussion_r447112657
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetadataCacheSuite.scala
##########
@@ -126,4 +129,39 @@ class HiveMetadataCacheSuite extends QueryTest with
SQLTestUtils with TestHiveSi
for (pruningEnabled <- Seq(true, false)) {
testCaching(pruningEnabled)
}
+
+ test("cache TTL") {
+ val sparkConfWithTTl = new SparkConf().set(SQLConf.METADATA_CACHE_TTL.key,
"1")
+ val newSession =
SparkSession.builder.config(sparkConfWithTTl).getOrCreate().cloneSession()
+
+ withSparkSession(newSession) { implicit spark =>
Review comment:
I've decided to move the test from `HiveMetadataCacheSuite` to
`SessionCatalogSuite` in
https://github.com/apache/spark/pull/28852/commits/18feeb02b11407b9eea1457139a91cb40ddc40cf:
- It does cover the in-memory catalog as well, which means bigger scope for
the test.
- It's easier to test it since SQLConf can be provided in the test.
I'm going to resolve this, but feel free to leave more comments on the new
test.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]