[MGNLCACHE-13] StoreTest is only passing by accident Created: 08/Jul/13  Updated: 09/Jul/13  Resolved: 08/Jul/13

Status: Closed
Project: Cache Modules
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.1

Type: Improvement Priority: Neutral
Reporter: Magnolia International Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MAGNOLIA-5167 StoreTest is only passing by accident Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

StoreTest.testClearCacheWhenExceptionOccurs() is currently setting up the cache directory to be target/cacheTest, but asserts that target/tmp exists and is empty. The tmp dir happens to be created by CacheResponseWrapper.thresholdReached() calling Path.getTempDirectory()

Suggestion: extract a subclass that gets reused accross the cache test which configures those directories, assert they don't exit in @Before and removes them in @After


Generated at Sun Feb 11 23:51:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.