kafka icon indicating copy to clipboard operation
kafka copied to clipboard

MINOR: Cleanup log.dirs in ReplicaManagerTest on JVM exit

Open gaurav-narula opened this issue 1 year ago • 4 comments

ReplicaManagerTest::setupReplicaManagerWithMockedPurgatories creates two log dirs, core/data and core/data2 and test testActiveProducerState creates a partition in core/data2.

This PR adds core/data2 and all files/directories within it to .gitignore.

gaurav-narula avatar Jan 30 '24 11:01 gaurav-narula

CC: @mimaison, please take a look

gaurav-narula avatar Jan 30 '24 11:01 gaurav-narula

Shouldn't we instead update the tests to use temp directories and cleanup any files they create?

mimaison avatar Jan 30 '24 14:01 mimaison

I agree with @mimaison, I think we should make sure the tests clean after themselves. Right now, it seems that data within core/data/ is deleted but the directories are still present.

jlprat avatar Jan 30 '24 14:01 jlprat

Addressed in 4406670

Shouldn't we instead update the tests to use temp directories and cleanup any files they create?

I think the tests deliberately use relative directories because of KAFKA-5759.

gaurav-narula avatar Jan 30 '24 17:01 gaurav-narula