Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/16/11 14:20:48 (13 years ago)
Author:
cneumuel
Message:

#1233

  • changed Log to ThreadSafeLog
  • added license information to all files
  • added assembly descriptions
  • using blocks before namespace
  • made TransactionManager static
  • removed DaoException
  • removed TimeSpanExtensions
  • renamed prepareHiveDatabase.sql should be renamed to Prepare Hive Database.sql
  • created Initialize Hive Database.sql
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/ConsoleTests/Program.cs

    r6367 r6431  
    2222      //TestThreadSafeLog(); return;
    2323      //TestThreadSafePersistence(); return;
     24      TestCappedLog(); return;
    2425      string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
    2526
     
    3132      var app = pm.Applications.Where(x => x.Name == "HeuristicLab.Clients.Hive.Slave.Tests").Single();
    3233      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());
    3361    }
    3462
     
    271299      PluginUtil.CollectDeclaringPlugins(plugins, types);
    272300      foreach (var plugin in plugins) {
    273         var p = PluginUtil.CreatePlugin(plugin, false);
     301        var p = PluginUtil.CreatePlugin(plugin);
    274302        p.Id = Guid.NewGuid();
    275303        lock (locker) {
Note: See TracChangeset for help on using the changeset viewer.