protected AllTestForEventFilterBase(string config) : base(config) { LogLevel = Logging.LogLevelFor <TLogEvent>(); // ReSharper disable once VirtualMemberCallInContructor _testingEventFilter = CreateTestingEventFilter(); }
public void Does_not_log_config_on_start() { var config = ConfigurationFactory.ParseString("akka.log-config-on-start = off") .WithFallback(DefaultConfig); var system = new ActorSystemImpl(Guid.NewGuid().ToString(), config); // Actor system should be started to attach the EventFilterFactory system.Start(); var eventFilter = new EventFilterFactory(new TestKit.Xunit2.TestKit(system)); // Notice here we forcedly start actor system again to monitor how it processes eventFilter.Info().Expect(0, () => system.Start()); system.Terminate(); }
public void Log_dead_letters() { var sys = ActorSystem.Create("LogDeadLetters", ConfigurationFactory.ParseString("akka.loglevel=INFO") .WithFallback(DefaultConfig)); try { var a = sys.ActorOf(Props.Create <Terminater>()); var eventFilter = new EventFilterFactory(new TestKit.Xunit2.TestKit(sys)); eventFilter.Info(contains: "not delivered").Expect(1, () => { a.Tell("run"); a.Tell("boom"); }); } finally { Shutdown(sys); } }
public void Logs_config_on_start_with_info_level() { var config = ConfigurationFactory.ParseString("akka.log-config-on-start = on") .WithFallback(DefaultConfig); var system = new ActorSystemImpl(Guid.NewGuid().ToString(), config, ActorSystemSetup.Empty); // Actor system should be started to attach the EventFilterFactory system.Start(); var eventFilter = new EventFilterFactory(new TestKit.Xunit2.TestKit(system)); // Notice here we forcedly start actor system again to monitor how it processes var expected = "log-config-on-start : on"; eventFilter.Info(contains: expected).ExpectOne(() => system.Start()); system.Terminate(); }