ajantha-bhat commented on a change in pull request #3653: [CARBONDATA-3665]
Support TimeBased Cache expiration using ExpiringMap
URL: https://github.com/apache/carbondata/pull/3653#discussion_r390868545
##########
File path:
integration/spark/src/test/scala/org/apache/carbondata/sql/commands/TestCarbonShowCacheCommand.scala
##########
@@ -288,4 +289,25 @@ class TestCarbonShowCacheCommand extends QueryTest with
BeforeAndAfterAll {
assert(showCache(0).get(2).toString.equalsIgnoreCase("5/5 index files
cached"))
sql("drop table if exists partitionTable")
}
+
+ test("test cache expiration using expiringMap") {
+ sql("drop table if exists carbonTable")
+ sql("create table carbonTable(col1 int, col2 string,col3 string) stored as
carbondata tblproperties('cache_expiration_time'='1')")
+ sql("insert into carbonTable select 1, 'ab', 'vf'")
+ sql("select count(*) from carbonTable").show(false)
+ var showCache = sql("show metacache on table carbonTable").collect()
+ assert(showCache(0).get(2).toString.equalsIgnoreCase("1/1 index files
cached"))
+ Thread.sleep(60000)
Review comment:
1 minute is too much waiting time. change to 5 seconds
----------------------------------------------------------------
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]
With regards,
Apache Git Services