-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from jfrosch/Fix_Cache_Config_Issue_62
Made CacheConfig inner class of CachePluginConfiguration a nested (st…
- Loading branch information
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/integration-test/groovy/com/demo/MaxCapacityCacheSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.demo | ||
|
||
import grails.plugin.cache.GrailsConcurrentLinkedMapCache | ||
import grails.plugin.cache.GrailsConcurrentLinkedMapCacheManager | ||
import grails.testing.mixin.integration.Integration | ||
import spock.lang.Specification | ||
import spock.lang.Unroll | ||
|
||
/** | ||
* This test case validates the documented cache configuration behavior and fix for | ||
* issue https://github.com/grails-plugins/grails-cache/issues/62 | ||
*/ | ||
@Integration | ||
class MaxCapacityCacheSpec extends Specification { | ||
|
||
GrailsConcurrentLinkedMapCacheManager grailsCacheManager | ||
|
||
@Unroll | ||
void "Verify max capacities set for configured caches"() { | ||
when: | ||
GrailsConcurrentLinkedMapCache cache = grailsCacheManager.getCache(cacheName) as GrailsConcurrentLinkedMapCache | ||
|
||
then: | ||
cache.capacity == expectedCapacity | ||
|
||
where: | ||
cacheName | expectedCapacity | ||
'foo' | 100 | ||
'bar' | 200 | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters