- Timestamp:
- 11/27/14 16:00:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab-3.3/ThreadSafeLogTest.cs
r11171 r11597 28 28 [TestClass] 29 29 public class ThreadSafeLogTest { 30 31 30 [TestMethod] 32 31 [TestCategory("General")] … … 43 42 Assert.AreEqual(count, log.Messages.Count()); 44 43 } 44 45 [TestMethod] 46 [TestCategory("General")] 47 [TestProperty("Time", "short")] 48 public void ThreadSafeLogThreadCapTest() { 49 int count = 10000; 50 int cap = 500; 51 ThreadSafeLog log = new ThreadSafeLog(cap); 52 53 Parallel.For(0, count, (i) => { 54 log.LogMessage("Message " + i); // write something 55 log.Messages.Count(); // iterate over all messages 56 }); 57 58 Assert.AreEqual(cap, log.Messages.Count()); 59 } 45 60 } 46 61 }
Note: See TracChangeset
for help on using the changeset viewer.