Dev-tools
Dev-tools

Reputation: 21

Issues with Redis Embedded Temporary Files Accumulation in Windows using java quarkus

I am using Redis Embedded in my Java Quakrus tests with the following

dependency: <dependency> <groupId>it.ozimov</groupId> <artifactId>embedded-redis</artifactId> <version>0.7.3</version> <scope>test</scope> </dependency>

After running my tests, I noticed that the storage space on my Windows machine was decreasing significantly. Upon investigation, I found a files named like RedisQFork_22904.dat located in C:\Users\UserHK\AppData\Local\Redis. Deleting this files restored the disk space. Here’s the relevant part of my Redis setup:

@BeforeAll public static void setUp() throws Exception {redisServer = RedisServer.builder().port(6379).setting("maxmemory 128mb").setting("maxmemory-policy allkeys-lru").setting("appendonly no").setting("save \"\"").build();redisServer.start();assertTrue(redisServer.isActive()); }

@AfterAll public static void cleanUp() {if (redisServer != null) {redisServer.stop();}}

Any advice or solutions would be greatly appreciated! How can I ensure that temporary files like RedisQFork_*.dat do not accumulate after running my tests? Is there a way to automatically clean them up at the end of the tests?

Upvotes: 0

Views: 75

Answers (0)

Related Questions