- def 'Verify configs for Distributed Caches'(){
- given: 'the Trust Level Per Dmi Plugin Cache config'
- def trustLevelDmiPerPluginCacheConfig = Hazelcast.getHazelcastInstanceByName('hazelcastInstanceTrustLevelPerDmiPluginMap').config
- def trustLevelDmiPerPluginCacheMapConfig = trustLevelDmiPerPluginCacheConfig.mapConfigs.get('trustLevelPerDmiPluginCacheConfig')
- expect: 'system created instance with correct config'
- assert trustLevelDmiPerPluginCacheConfig.clusterName == 'cps-and-ncmp-test-caches'
- assert trustLevelDmiPerPluginCacheMapConfig.backupCount == 3
- assert trustLevelDmiPerPluginCacheMapConfig.asyncBackupCount == 3
+ def 'Trust level cache configurations: #scenario'() {
+ when: 'retrieving the cache config for trustLevel'
+ def cacheConfig = Hazelcast.getHazelcastInstanceByName(hazelcastInstanceName).config
+ then: 'the cache config has the right cluster'
+ assert cacheConfig.clusterName == 'cps-and-ncmp-test-caches'
+ when: 'retrieving the map config for trustLevel'
+ def mapConfig = cacheConfig.mapConfigs.get(hazelcastMapConfigName)
+ then: 'the map config has the correct backup counts'
+ assert mapConfig.backupCount == 3
+ assert mapConfig.asyncBackupCount == 3
+ where: 'the following caches are used'
+ scenario | hazelcastInstanceName | hazelcastMapConfigName
+ 'cmhandle map' | 'hazelcastInstanceTrustLevelPerCmHandleMap' | 'trustLevelPerCmHandleCacheConfig'
+ 'dmi plugin map' | 'hazelcastInstanceTrustLevelPerDmiPluginMap' | 'trustLevelPerDmiPluginCacheConfig'