cloud-fan commented on a change in pull request #28852:
URL: https://github.com/apache/spark/pull/28852#discussion_r455917399



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileIndexSuite.scala
##########
@@ -488,6 +489,30 @@ class FileIndexSuite extends SharedSparkSession {
     val fileIndex = new TestInMemoryFileIndex(spark, path)
     assert(fileIndex.leafFileStatuses.toSeq == statuses)
   }
+
+  test("expire FileStatusCache if TTL is configured") {
+    val previousValue = SQLConf.get.getConf(StaticSQLConf.METADATA_CACHE_TTL)
+    try {
+      SQLConf.get.setConf(StaticSQLConf.METADATA_CACHE_TTL, 1L)

Review comment:
       ah i see, it's kind of a workaround to set static conf at runtime. Maybe 
we should add a comment to speak it out.




----------------------------------------------------------------
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]

Reply via email to