瀏覽代碼

[System.Runtime.Caching] Make TestExpiredGetValues test more reliable

It failed twice on Jenkins over the weekend:

```
Test Case Failures:
1) MonoTests.System.Runtime.Caching.MemoryCacheTest.TestExpiredGetValues :   #EGV4
  Expected: 0
  But was:  9

at MonoTests.System.Runtime.Caching.MemoryCacheTest.TestExpiredGetValues () [0x0012b] in /media/ssd/jenkins/workspace/test-mono-mainline/label/debian-armel/mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs:1304
```

We're sleeping just as long as the expiry time of the cache items (1s) which might not be enough.
Bumping the sleep time should fix this.
Alexander Köplinger 10 年之前
父節點
當前提交
a4f6ac0700
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs

+ 2 - 2
mcs/class/System.Runtime.Caching/Test/System.Runtime.Caching/MemoryCacheTest.cs

@@ -1,4 +1,4 @@
-//
+//
 // MemoryCacheTest.cs
 //
 // Authors:
@@ -1293,7 +1293,7 @@ namespace MonoTests.System.Runtime.Caching
 
 				Assert.AreEqual (10, mc.GetCount (), "#EGV2");
 
-				global::System.Threading.Thread.Sleep (1000);
+				global::System.Threading.Thread.Sleep (4 * 1000);
 
 				// we have waited but the items won't be expired by the timer since it wont have fired yet
 				Assert.AreEqual (10, mc.GetCount (), "#EGV3");