[MAGNOLIA-5167] StoreTest is only passing by accident Created: 08/Jul/13  Updated: 24/Jul/13  Resolved: 17/Jul/13

Status: Closed
Project: Magnolia
Component/s: cache, testing
Affects Version/s: None
Fix Version/s: 4.5.10

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

Issue Links:
Cloners
clones MGNLCACHE-13 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



 Comments   
Comment by Magnolia International [ 08/Jul/13 ]

Fixed in 5.0 with MGNLCACHE-13, please backport.

Generated at Mon Feb 12 04:02:37 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.