-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
82 additions
and
136 deletions.
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
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
53 changes: 15 additions & 38 deletions
53
tests/specs/cache/providers/CacheBoxWithConcurrentStoreTest.cfc
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
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 |
---|---|---|
@@ -1,43 +1,19 @@ | ||
component extends="CacheBoxProviderTest" { | ||
|
||
function setup(){ | ||
super.setup(); | ||
|
||
// Config | ||
config = { | ||
objectDefaultTimeout : 60, | ||
objectDefaultLastAccessTimeout : 30, | ||
useLastAccessTimeouts : true, | ||
reapFrequency : 2, | ||
freeMemoryPercentageThreshold : 0, | ||
evictionPolicy : "LRU", | ||
evictCount : 1, | ||
maxObjects : 200, | ||
objectStore : "DiskStore", | ||
directoryPath : "/coldbox/tests/tmp/cacheDepot", | ||
// This switches the internal provider from normal cacheBox to coldbox enabled cachebox | ||
coldboxEnabled : false | ||
}; | ||
|
||
// Create Provider | ||
cache = createMock( "coldbox.system.cache.providers.CacheBoxProvider" ).init(); | ||
|
||
// Decorate it | ||
cache.setConfiguration( config ); | ||
cache.setCacheFactory( mockFactory ); | ||
cache.setEventManager( mockEventManager ); | ||
|
||
// Mock The Scheduler, we don't need any reaping async | ||
var mockSchedule = prepareMock( | ||
mockExecutor.newSchedule( function(){ | ||
debug( "In Mock Executor" ); | ||
} ) | ||
); | ||
mockExecutor.$( "newSchedule", mockSchedule ); | ||
// Configure the provider | ||
cache.configure(); | ||
// Clear everything first | ||
cache.clearAll(); | ||
} | ||
// Config | ||
variables.config = { | ||
objectDefaultTimeout : 60, | ||
objectDefaultLastAccessTimeout : 30, | ||
useLastAccessTimeouts : true, | ||
reapFrequency : 2, | ||
freeMemoryPercentageThreshold : 0, | ||
evictionPolicy : "LRU", | ||
evictCount : 1, | ||
maxObjects : 200, | ||
objectStore : "DiskStore", | ||
directoryPath : "/coldbox/tests/tmp/cacheDepot", | ||
// This switches the internal provider from normal cacheBox to coldbox enabled cachebox | ||
coldboxEnabled : false | ||
}; | ||
|
||
} |
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 |
---|---|---|
@@ -1,44 +1,20 @@ | ||
component extends="CacheBoxProviderTest" { | ||
|
||
function setup(){ | ||
super.setup(); | ||
|
||
// Config | ||
config = { | ||
objectDefaultTimeout : 60, | ||
objectDefaultLastAccessTimeout : 30, | ||
useLastAccessTimeouts : true, | ||
reapFrequency : 2, | ||
freeMemoryPercentageThreshold : 0, | ||
evictionPolicy : "LRU", | ||
evictCount : 1, | ||
maxObjects : 200, | ||
objectStore : "JDBCStore", | ||
dsn : "coolblog", | ||
table : "cacheBox", | ||
// This switches the internal provider from normal cacheBox to coldbox enabled cachebox | ||
coldboxEnabled : false | ||
}; | ||
|
||
// Create Provider | ||
cache = createMock( "coldbox.system.cache.providers.CacheBoxProvider" ).init(); | ||
|
||
// Decorate it | ||
cache.setConfiguration( config ); | ||
cache.setCacheFactory( mockFactory ); | ||
cache.setEventManager( mockEventManager ); | ||
|
||
// Mock The Scheduler, we don't need any reaping async | ||
var mockSchedule = prepareMock( | ||
mockExecutor.newSchedule( function(){ | ||
debug( "In Mock Executor" ); | ||
} ) | ||
); | ||
mockExecutor.$( "newSchedule", mockSchedule ); | ||
// Configure the provider | ||
cache.configure(); | ||
// Clear everything first | ||
cache.clearAll(); | ||
} | ||
// Config | ||
variables.config = { | ||
objectDefaultTimeout : 60, | ||
objectDefaultLastAccessTimeout : 30, | ||
useLastAccessTimeouts : true, | ||
reapFrequency : 2, | ||
freeMemoryPercentageThreshold : 0, | ||
evictionPolicy : "LRU", | ||
evictCount : 1, | ||
maxObjects : 200, | ||
objectStore : "JDBCStore", | ||
dsn : "coolblog", | ||
table : "cacheBox", | ||
// This switches the internal provider from normal cacheBox to coldbox enabled cachebox | ||
coldboxEnabled : false | ||
}; | ||
|
||
} |