Changeset 6431 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConsoleTests
- Timestamp:
- 06/16/11 14:20:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConsoleTests/Program.cs
r6367 r6431 22 22 //TestThreadSafeLog(); return; 23 23 //TestThreadSafePersistence(); return; 24 TestCappedLog(); return; 24 25 string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); 25 26 … … 31 32 var app = pm.Applications.Where(x => x.Name == "HeuristicLab.Clients.Hive.Slave.Tests").Single(); 32 33 pm.Run(app); 34 } 35 36 private static void TestCappedLog() { 37 ILog log = new Log(); // maxMessageCount = -1 38 Console.WriteLine("0=={0}", log.Messages.Count()); 39 log.LogMessage("asdf"); 40 Console.WriteLine("1=={0}", log.Messages.Count()); 41 log.LogMessage("asdf"); 42 log.LogMessage("asdf"); 43 Console.WriteLine("3=={0}", log.Messages.Count()); 44 45 ILog log0 = new Log(0); 46 Console.WriteLine("0=={0}", log0.Messages.Count()); 47 log0.LogMessage("asdf"); 48 Console.WriteLine("0=={0}", log0.Messages.Count()); 49 log0.LogMessage("asdf"); 50 log0.LogMessage("asdf"); 51 log0.LogMessage("asdf"); 52 Console.WriteLine("0=={0}", log0.Messages.Count()); 53 54 ILog log1 = new Log(1); 55 log1.LogMessage("asdf 1"); 56 Console.WriteLine("1=={0}", log1.Messages.Count()); 57 log1.LogMessage("asdf 2"); 58 log1.LogMessage("asdf 3"); 59 Console.WriteLine("1=={0}", log1.Messages.Count()); 60 Console.WriteLine("asdf 3=={0}", log1.Messages.First()); 33 61 } 34 62 … … 271 299 PluginUtil.CollectDeclaringPlugins(plugins, types); 272 300 foreach (var plugin in plugins) { 273 var p = PluginUtil.CreatePlugin(plugin , false);301 var p = PluginUtil.CreatePlugin(plugin); 274 302 p.Id = Guid.NewGuid(); 275 303 lock (locker) {
Note: See TracChangeset
for help on using the changeset viewer.