Commit Graph
12 Commits
Author SHA1 Message Date
Alexander Köplinger 98513c62ec [System.Runtime.Caching] Fixed test that failed intermittently on slow systems
Apparently on slow systems the items with 1sec expiration time are already removed from the cache by the time the #CS3 Assert() is hit, which caused the test to fail.
Increasing the expiration time by +2sec should hopefully fix this.

Commit licensed under MIT/X11.
2014-06-19 21:54:02 +02:00
Alexis Christoforides 4c2a8ed3dd Extended test time for timer-sensitive tests. 2014-04-28 16:52:25 -04:00
Craig Minihan 3c759e3969 [Fix] Bugzilla #18213 - System.Runtime.Caching.MemoryCache doesn't honor SlidingExpiration 2014-03-26 17:32:01 -07:00
Craig Minihan 8218c4afa1 [Fix] Bugzilla #18235 - System.Runtime.Caching.MemoryCache doesn't order expirable items correctly
- BubbleUp() in MemoryCacheEntryPriorityQueue was not ordering correctly on item insert
- Added a test case
2014-03-15 13:57:50 -07:00
Craig Minihan d4ea35a94a [Fix] Bugzilla #18245 - System.Runtime.MemoryCache.GetValues() throws LockRecursionException with expired items
- GetValues() calls MemoryCacheContainer.GetEntry() which now gets an EnterUpgradeableReadLock needed by ExpireIfNeeded()
- Added a test case
2014-03-07 04:40:23 -08:00
Craig Minihan 58e399bb9b [Fix] Bugzilla #17897 - MemoryCacheEntryPriorityQueue throws out of bounds after shrink
- when MemoryCacheEntryPriorityQueue grows the timed items after a shrink
  the value of the member variable heapSize is wrong allowing an out-of-
  bounds exception which would normally be prevented by bounds tests
- A test case was added for the out-of-bounds exception
2014-03-06 02:46:49 -08:00
Marek Safar c83e56292d [System.Runtime.Caching] Fix ambiguous method call 2014-02-21 09:27:30 +01:00
Marek Habersack 23691dacd6 [system.runtime.caching] Do not test the invalid behavior 2011-01-04 10:22:22 +01:00
Marek Habersack 920a298158 2010-04-26 Marek Habersack <[email protected]>
* MemoryCacheTest.cs: added tests for LRU removal of entries.

2010-04-26  Marek Habersack  <[email protected]>

	* MemoryCacheLRU.cs: added

	* MemoryCacheContainer.cs: added LRU entry cache.

	* MemoryCache.cs: added option to emulate one CPU on SMP machines
	(for testing purposes) - "__MonoEmulateOneCPU"

svn path=/trunk/mcs/; revision=156125
2010-04-26 19:39:32 +00:00
Marek Habersack 972273ea96 2010-04-24 Marek Habersack <[email protected]>
* MemoryCacheTest.cs, ObjectCacheTest.cs: added

	* HostFileChangeMonitorTest.cs: added more tests.

2010-04-24  Marek Habersack  <[email protected]>

	* AppDomainTools.cs, AssertExtensions.cs, PokerChangeMonitor.cs,
	PokerMemoryCache.cs, PokerObjectCache.cs,
	TestNotificationSystem.cs: added

2010-04-24  Marek Habersack  <[email protected]>

	* ObjectCache.cs: implemented all the non-abstract methods.

	* MemoryCacheContainer.cs, MemoryCacheEntry.cs,
	MemoryCacheEntryChangeMonitor.cs,
	MemoryCacheEntryPriorityQueue.cs,
	MemoryCachePerformanceCounters.cs: added

	* MemoryCache.cs: implemented physical memory size detection, item
	expiration timer, indexer, reading of configuration values from
	config files, cache memory limit calculation, the
	AddOrGetExisting, Set, Get, Contains,
	CreateCacheEntryChangeMonitor, Dispose, GetCacheItem, GetCount,
	GetEnumerator, GetValues, Remove and Trim methods.
	Implemented support for per-cpu item containers.
	Modified parameters of several methods to match .NET 4.0 release.

	* HostFileChangeMonitor.cs: implemented according to tests.

	* Helpers.cs: added new properties, StringComparer and Is64bit

	* FileChangeNotificationSystemEntry.cs: added

	* FileChangeNotificationSystem.cs: implemented

	* ChangeMonitor.cs: NotifyOnChanged now properly throws an
	exception if it was called more than once.

	* CacheEntryRemovedReason.cs: renamed from
	CacheEntryRemoveReason.cs

	* CacheEntryChangeMonitor.cs: renamed from CacheEntryMonitor.cs

2010-04-24  Marek Habersack  <[email protected]>

	* MemoryCacheSettingsCollection.cs: added and implemented methods
	which appeared in .NET 4.0 final.

svn path=/trunk/mcs/; revision=156032
2010-04-23 23:54:57 +00:00
Jb Evain 1cfe332670 fix run-test
svn path=/trunk/mcs/; revision=155051
2010-04-08 14:36:34 +00:00
Marek Habersack 44d44d4be1 Beginnings of System.Runtime.Caching
svn path=/trunk/mcs/; revision=154941
2010-04-07 13:13:03 +00:00