public void TestOnExternalAccountDownload() { TestSetup.DeleteCurrentDefaultLog(); var messages = new List <string>(); messages.Add("From: [email protected]\r\n" + "To: [email protected]\r\n" + "Subject: Message 1\r\n" + "\r\n" + "Message 1!"); messages.Add("From: [email protected]\r\n" + "To: [email protected]\r\n" + "Subject: Message 2\r\n" + "\r\n" + "Message 2!"); messages.Add("From: [email protected]\r\n" + "To: [email protected]\r\n" + "Subject: Message 3\r\n" + "\r\n" + "Message 3!"); // The second message should be deleted after 5 days. string script = "Sub OnExternalAccountDownload(oFetchAccount, oMessage, sRemoteUID)" + Environment.NewLine + " EventLog.Write(\"UID: \" & sRemoteUID) " + Environment.NewLine + " EventLog.Write(\"FetchAccount: \" & oFetchAccount.Name) " + Environment.NewLine + " If Not oMessage Is Nothing Then " + Environment.NewLine + " EventLog.Write(\"From: \" & oMessage.FromAddress) " + Environment.NewLine + " EventLog.Write(\"Filename: \" & oMessage.FileName) " + Environment.NewLine + " Else " + Environment.NewLine + " EventLog.Write(\"Message details missing\") " + Environment.NewLine + " End If" + Environment.NewLine + " if sRemoteUID = \"UniqueID-" + messages[1].GetHashCode() + "\" Then " + Environment.NewLine + " Result.Value = 2 " + Environment.NewLine + " Result.Parameter = 5 " + Environment.NewLine + " End If " + Environment.NewLine + " End Sub"; Scripting scripting = _settings.Scripting; string file = scripting.CurrentScriptFile; TestSetup.WriteFile(file, script); scripting.Enabled = true; scripting.Reload(); Account account = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); FetchAccount fa; int port = TestSetup.GetNextFreePort(); using (var pop3Server = new POP3Server(1, port, messages)) { pop3Server.StartListen(); fa = account.FetchAccounts.Add(); fa.Enabled = true; fa.MinutesBetweenFetch = 10; fa.Name = "TestFA"; fa.Username = "******"; fa.Password = "******"; fa.UseSSL = false; fa.ServerAddress = "localhost"; fa.Port = port; fa.ProcessMIMERecipients = false; fa.DaysToKeepMessages = -1; fa.Save(); fa.DownloadNow(); pop3Server.WaitForCompletion(); string eventLogFile = _settings.Logging.CurrentEventLog; string logContents = TestSetup.ReadExistingTextFile(eventLogFile); CustomAssert.IsTrue(logContents.Contains("FetchAccount: " + fa.Name)); CustomAssert.IsTrue(logContents.Contains("From: [email protected]")); CustomAssert.IsTrue(logContents.Contains("From: [email protected]")); CustomAssert.IsTrue(logContents.Contains("From: [email protected]")); string appLogContent = TestSetup.ReadCurrentDefaultLog(); CustomAssert.IsTrue(pop3Server.DeletedMessages.Contains(1)); CustomAssert.IsFalse(pop3Server.DeletedMessages.Contains(2)); CustomAssert.IsTrue(pop3Server.DeletedMessages.Contains(3)); CustomAssert.IsTrue(pop3Server.RetrievedMessages.Contains(1)); CustomAssert.IsTrue(pop3Server.RetrievedMessages.Contains(2)); CustomAssert.IsTrue(pop3Server.RetrievedMessages.Contains(3)); POP3ClientSimulator.AssertMessageCount(account.Address, "test", 3); } using (var pop3Server = new POP3Server(1, port, messages)) { pop3Server.StartListen(); // Download again... fa.DownloadNow(); pop3Server.WaitForCompletion(); // Make sure that no messages are deleted. CustomAssert.AreEqual(0, pop3Server.DeletedMessages.Count); CustomAssert.AreEqual(0, pop3Server.RetrievedMessages.Count); POP3ClientSimulator.AssertMessageCount(account.Address, "test", 3); } }
public void SetUpTest() { _account = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); _serverPort = TestSetup.GetNextFreePort(); }
public void TestDeliverToExternalMimeRecipientsEnabled() { var messages = new List <string>(); string message = "From: [email protected]\r\n" + "To: \"Test\" <*****@*****.**>, \"ExternalGuy\" <*****@*****.**>\r\n" + "Subject: Test\r\n" + "\r\n" + "Hello!"; messages.Add(message); int port = TestSetup.GetNextFreePort(); using (var pop3Server = new Pop3ServerSimulator(1, port, messages)) { pop3Server.StartListen(); var deliveryResults = new Dictionary <string, int>(); deliveryResults["*****@*****.**"] = 250; int smtpServerPort = TestSetup.GetNextFreePort(); using (var smtpServer = new SmtpServerSimulator(1, smtpServerPort)) { smtpServer.AddRecipientResult(deliveryResults); smtpServer.StartListen(); // Add a route so we can connect to localhost. Route route = TestSetup.AddRoutePointingAtLocalhost(1, smtpServerPort, false); route.TreatSecurityAsLocalDomain = true; route.Save(); Account account1 = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); Account account2 = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); Account catchallAccount = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); _domain.Postmaster = catchallAccount.Address; _domain.Save(); FetchAccount fa = account1.FetchAccounts.Add(); fa.Enabled = true; fa.MinutesBetweenFetch = 10; fa.Name = "Test"; fa.Username = "******"; fa.Password = "******"; fa.UseSSL = false; fa.ServerAddress = "localhost"; fa.Port = port; fa.ProcessMIMERecipients = true; fa.EnableRouteRecipients = true; fa.Save(); fa.DownloadNow(); pop3Server.WaitForCompletion(); fa.Delete(); string downloadedMessage1 = Pop3ClientSimulator.AssertGetFirstMessageText(account2.Address, "test"); Pop3ClientSimulator.AssertMessageCount(account1.Address, "test", 0); Pop3ClientSimulator.AssertMessageCount(catchallAccount.Address, "test", 0); Assert.IsTrue(downloadedMessage1.Contains(message), downloadedMessage1); // Make sure the exernal list has received his copy. smtpServer.WaitForCompletion(); string messageData = smtpServer.MessageData; Assert.IsTrue(messageData.Contains(messageData), messageData); CustomAsserts.AssertRecipientsInDeliveryQueue(0, false); } } }
public void TestSpamProtectionPostTransmission() { _application.Settings.AntiSpam.SpamMarkThreshold = 1; _application.Settings.AntiSpam.SpamDeleteThreshold = 100; _application.Settings.AntiSpam.AddHeaderReason = true; _application.Settings.AntiSpam.AddHeaderSpam = true; _application.Settings.AntiSpam.PrependSubject = true; _application.Settings.AntiSpam.PrependSubjectText = "ThisIsSpam"; SURBLServer surblServer = _application.Settings.AntiSpam.SURBLServers[0]; surblServer.Active = true; surblServer.Score = 5; surblServer.Save(); var messages = new List <string>(); string message = "Received: from example.com (example.com [1.2.3.4]) by mail.host.edu\r\n" + "From: [email protected]\r\n" + "To: [email protected]\r\n" + "Subject: Test\r\n" + "\r\n" + "http://surbl-org-permanent-test-point.com/"; messages.Add(message); int port = TestSetup.GetNextFreePort(); using (var pop3Server = new Pop3ServerSimulator(1, port, messages)) { pop3Server.StartListen(); Account account = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); FetchAccount fa = account.FetchAccounts.Add(); fa.Enabled = true; fa.MinutesBetweenFetch = 10; fa.Name = "Test"; fa.Username = "******"; fa.Password = "******"; fa.UseSSL = false; fa.ServerAddress = "localhost"; fa.Port = port; fa.ProcessMIMERecipients = false; fa.DaysToKeepMessages = -1; fa.UseAntiSpam = true; fa.Save(); fa.DownloadNow(); pop3Server.WaitForCompletion(); fa.Delete(); string downloadedMessage = Pop3ClientSimulator.AssertGetFirstMessageText(account.Address, "test"); Assert.IsTrue(downloadedMessage.Contains("X-hMailServer-Spam: YES")); } }
public async Task GivenAnExistingSnapshotForVersion(ulong version) { this.Context.Snapshot = TestSetup.GetSnapshot();; await this.Context.EventStore.CreateSnapshot(this.Context.StreamId, version, this.Context.Snapshot, this.Context.SnapshotMetadata); }
public async Task WhenICreateSnapshotWithMetadataForStreamInVersion(string streamId, ulong version) { this.Context.SnapshotMetadata = TestSetup.GetMetadata(); await WhenICreateSnapshotForStreamInVersion(streamId, version); }
static SongInfoProviderTests() { TestSetup.Initialize(); }
public async Task GivenAnExistingStream(string streamId, ushort events) { this.Context.StreamId = streamId; await this.Context.EventStore.WriteToStream(streamId, TestSetup.GetEvents(events)); }
static ReadBeastSaber_Tests() { TestSetup.Initialize(); }
public void SetNewSetup(TestSetup setup) { EndTest(); StopAllCoroutines(); this.setup = setup; }
private void TestSeup_Click(object sender, RoutedEventArgs e) { TestSetup testSetup = new TestSetup(); SharedVariables sharedVariables = new SharedVariables(); bool? Result1 = testSetup.ShowDialog(); }
public FileCommitter(TestSetup testSetup) { _testSetup = testSetup; }
public void TestFetchMessagesWithVeryLongHeader() { var messages = new List <string>(); var toHeaderBuilder = new StringBuilder(); for (int i = 0; i < 10000; i++) { if (i > 0) { toHeaderBuilder.Append("; "); } toHeaderBuilder.AppendFormat("to-{0}@example.com", i); } for (int i = 0; i < 5; i++) { string message = string.Format("To: {1}\r\n" + "X-Dummy: {0}\r\n" + "Subject: Test\r\n" + "\r\n" + "Hello!", i, toHeaderBuilder); messages.Add(message); } int port = TestSetup.GetNextFreePort(); using (var pop3Server = new POP3Server(1, port, messages)) { pop3Server.SendBufferMode = POP3Server.BufferMode.SingleBuffer; pop3Server.StartListen(); Account account = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); FetchAccount fa = account.FetchAccounts.Add(); fa.Enabled = true; fa.MinutesBetweenFetch = 10; fa.Name = "Test"; fa.Username = "******"; fa.Password = "******"; fa.UseSSL = false; fa.ServerAddress = "localhost"; fa.Port = port; fa.ProcessMIMERecipients = false; fa.Save(); fa.DownloadNow(); pop3Server.WaitForCompletion(); LockHelper.WaitForUnlock(fa); fa.Delete(); POP3ClientSimulator.AssertMessageCount(account.Address, "test", 5); string downloadedMessage = POP3ClientSimulator.AssertGetFirstMessageText(account.Address, "test"); for (int i = 0; i < 5; i++) { if (downloadedMessage.Contains(messages[i])) { return; } } CustomAssert.Fail("Downloaded messages did not match uploaded messages."); } }
void DrawMenuGUI() { GUILayout.BeginVertical(); GUILayout.FlexibleSpace(); GUILayout.Label("Tween Duration", labelStyle); durationSelId = GUILayout.Toolbar(durationSelId, durationList); GUILayout.Space(vspace); GUILayout.Label("Number of Tweens", labelStyle); numTweensSelId = GUILayout.Toolbar(numTweensSelId, numTweensList); GUILayout.Space(vspace); GUILayout.Label("Tweens", labelStyle); GUILayout.BeginHorizontal(); positionTween = GUILayout.Toggle(positionTween, "Position"); rotationTween = GUILayout.Toggle(rotationTween, "Rotation"); scaleTween = GUILayout.Toggle(scaleTween, "Scale"); if (!positionTween && !rotationTween && !scaleTween) positionTween = true; GUILayout.EndHorizontal(); GUILayout.Space(vspace); GUILayout.Label("Test Type", labelStyle); testType = (TestType)GUILayout.Toolbar((int)testType, testTypeList); if (testType == TestType.Floats && testSetup == TestSetup.Emit) testSetup = TestSetup.Loop; GUILayout.Space(vspace); GUILayout.Label("Test Setup", labelStyle); testSetup = (TestSetup)GUILayout.Toolbar((int)testSetup, testSetupList); GUILayout.Space(vspace); GUILayout.Label("Easing", labelStyle); easing = (Easing)GUILayout.Toolbar((int)easing, easingList); GUILayout.Space(vspace); GUILayout.Label("Options", labelStyle); disableRenderers = GUILayout.Toggle(disableRenderers, "Disable Renderers"); GUILayout.Space(vspace); GUILayout.Label("Engine", labelStyle); engine = (Engine)GUILayout.Toolbar((int)engine, engineList); GUILayout.Space(vspace); if (GUILayout.Button("START")) { numTweens = Convert.ToInt32(numTweensList[numTweensSelId]); if (engine == Engine.GoKit && testType == TestType.Floats && numTweens >= 8000) state = State.ConfirmGoKit; else if (engine == Engine.iTween) { if (testSetup == TestSetup.Emit) state = State.NoEmitWITween; else if (numTweens > 4000) state = State.ConfirmITween; else StartCoroutine(StartRun()); } else StartCoroutine(StartRun()); } GUILayout.FlexibleSpace(); GUILayout.EndVertical(); }
static ReadScoreSaber_Tests() { TestSetup.Initialize(); }
public bool SaveTestSetup(TestSetup testSetup) { return(testSetupGeteWay.SaveTestSetup(testSetup)); }
protected BaseTest() { TestSetup.InitializeMapper(); }
static RunReaders_Tests() { TestSetup.Initialize(); }
public bool IsTestNameExist(TestSetup testSetup) { return(testSetupGateway.IsTestNameExist(testSetup)); }
public async Task GivenAnExistingSnapshotWithMetadataForVersion(ulong version) { this.Context.SnapshotMetadata = TestSetup.GetMetadata(); await this.GivenAnExistingSnapshotForVersion(version); }
public ContactFailure() { _setup = new TestSetup(); _driver = _setup.Driver; _baseUrl = _setup.BaseUrl; }
static Initialize_Tests() { TestSetup.Initialize(); }
static TryAdd_Tests() { TestSetup.Initialize(); }
public void TestSpamProtectionNoTagging() { CustomAsserts.AssertSpamAssassinIsRunning(); _application.Settings.AntiSpam.SpamMarkThreshold = 5; _application.Settings.AntiSpam.SpamDeleteThreshold = 9999; _application.Settings.AntiSpam.MaximumMessageSize = 1024 * 1024; _application.Settings.AntiSpam.AddHeaderReason = false; _application.Settings.AntiSpam.AddHeaderSpam = false; _application.Settings.AntiSpam.PrependSubject = false; _application.Settings.AntiSpam.PrependSubjectText = "ThisIsSpam"; // Enable SpamAssassin _application.Settings.AntiSpam.SpamAssassinEnabled = true; _application.Settings.AntiSpam.SpamAssassinHost = "localhost"; _application.Settings.AntiSpam.SpamAssassinPort = 783; _application.Settings.AntiSpam.SpamAssassinMergeScore = true; _application.Settings.AntiSpam.SpamAssassinScore = 5; var messages = new List <string>(); string message = "From: [email protected]\r\n" + "To: [email protected]\r\n" + "Subject: Test\r\n" + "\r\n" + "XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X"; messages.Add(message); int port = TestSetup.GetNextFreePort(); using (var pop3Server = new Pop3ServerSimulator(1, port, messages)) { pop3Server.StartListen(); Account account = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); FetchAccount fa = account.FetchAccounts.Add(); fa.Enabled = true; fa.MinutesBetweenFetch = 10; fa.Name = "Test"; fa.Username = "******"; fa.Password = "******"; fa.UseSSL = false; fa.ServerAddress = "localhost"; fa.Port = port; fa.ProcessMIMERecipients = false; fa.DaysToKeepMessages = -1; fa.UseAntiSpam = true; fa.Save(); fa.DownloadNow(); pop3Server.WaitForCompletion(); fa.Delete(); Pop3ClientSimulator.AssertMessageCount(account.Address, "test", 1); } }
static TryRemove_Tests() { TestSetup.Initialize(); }
public void TestSpamProtectionPreTransmissionHELOPassFirst() { _application.Settings.AntiSpam.SpamMarkThreshold = 1; _application.Settings.AntiSpam.SpamDeleteThreshold = 100; _application.Settings.AntiSpam.AddHeaderReason = true; _application.Settings.AntiSpam.AddHeaderSpam = true; _application.Settings.AntiSpam.PrependSubject = true; _application.Settings.AntiSpam.PrependSubjectText = "ThisIsSpam"; _application.Settings.AntiSpam.CheckHostInHelo = true; _application.Settings.AntiSpam.CheckHostInHeloScore = 105; IncomingRelay incomingRelay = _application.Settings.IncomingRelays.Add(); incomingRelay.LowerIP = "1.2.1.2"; incomingRelay.UpperIP = "1.2.1.3"; incomingRelay.Name = "Test"; incomingRelay.Save(); var messages = new List <string>(); string message = "Received: from example.com (example.com [1.2.1.2]) by mail.host.edu\r\n" + "Received: from mail.hmailserver.com (mail.hmailserver.com [" + TestSetup.GethMailServerCOMIPaddress() + "]) by mail.host.edu\r\n" + "From: [email protected]\r\n" + "To: [email protected]\r\n" + "Subject: Test\r\n" + "\r\n" + "Should be blocked by SPF."; messages.Add(message); int port = TestSetup.GetNextFreePort(); using (var pop3Server = new Pop3ServerSimulator(1, port, messages)) { pop3Server.StartListen(); Account account = SingletonProvider <TestSetup> .Instance.AddAccount(_domain, "*****@*****.**", "test"); FetchAccount fa = account.FetchAccounts.Add(); fa.Enabled = true; fa.MinutesBetweenFetch = 10; fa.Name = "Test"; fa.Username = "******"; fa.Password = "******"; fa.UseSSL = false; fa.ServerAddress = "localhost"; fa.Port = port; fa.ProcessMIMERecipients = false; fa.DaysToKeepMessages = 0; fa.UseAntiSpam = true; fa.Save(); fa.DownloadNow(); pop3Server.WaitForCompletion(); fa.Delete(); Pop3ClientSimulator.AssertMessageCount(account.Address, "test", 1); } }
public void TestMultipleHostsTemporaryFailure() { CustomAssert.AreEqual(0, _status.UndeliveredMessages.Length); // No valid recipients... var deliveryResults = new Dictionary <string, int>(); deliveryResults["*****@*****.**"] = 250; deliveryResults["*****@*****.**"] = 250; deliveryResults["*****@*****.**"] = 499; int smtpServerPort = TestSetup.GetNextFreePort(); using (var server = new SMTPServerSimulator(2, smtpServerPort)) { server.AddRecipientResult(deliveryResults); server.AddRecipientResult(deliveryResults); server.StartListen(); // Add a route so we can connect to localhost. Route route = AddRoutePointingAtLocalhostMultipleHosts(2, smtpServerPort); // Send message to this route. var smtp = new SMTPClientSimulator(); var recipients = new List <string>(); recipients.Add("*****@*****.**"); recipients.Add("*****@*****.**"); recipients.Add("*****@*****.**"); if (!smtp.Send("*****@*****.**", recipients, "Test", "Test message")) { CustomAssert.Fail("Delivery failed"); } // Wait for the client to disconnect. server.WaitForCompletion(); } TestSetup.AssertRecipientsInDeliveryQueue(1); // Check so that only user 3 remains in the queue. CustomAssert.AreEqual(-1, _status.UndeliveredMessages.IndexOf("*****@*****.**")); CustomAssert.AreEqual(-1, _status.UndeliveredMessages.IndexOf("*****@*****.**")); CustomAssert.AreNotEqual(-1, _status.UndeliveredMessages.IndexOf("*****@*****.**")); using (var server = new SMTPServerSimulator(2, smtpServerPort)) { server.AddRecipientResult(deliveryResults); server.AddRecipientResult(deliveryResults); server.StartListen(); TestSetup.AssertRecipientsInDeliveryQueue(0, true); server.WaitForCompletion(); string bounceMessage = POP3ClientSimulator.AssertGetFirstMessageText("*****@*****.**", "test"); CustomAssert.IsFalse(bounceMessage.Contains("*****@*****.**")); CustomAssert.IsFalse(bounceMessage.Contains("*****@*****.**")); CustomAssert.IsTrue(bounceMessage.Contains("*****@*****.**")); CustomAssert.IsTrue(bounceMessage.Contains("499 [email protected]")); CustomAssert.IsTrue(bounceMessage.Contains("Tried 2 time(s)")); } }
private ProjDir GetLibRef(TestSetup setup) { return(new ProjDir(setup.LibDir)); }
public void TestPartialTemporaryErrorFailure() { CustomAssert.AreEqual(0, _status.UndeliveredMessages.Length); // No valid recipients... var deliveryResults = new Dictionary <string, int>(); deliveryResults["*****@*****.**"] = 250; deliveryResults["*****@*****.**"] = 250; deliveryResults["*****@*****.**"] = 400; int smtpServerPort = TestSetup.GetNextFreePort(); using (var server = new SMTPServerSimulator(1, smtpServerPort)) { server.AddRecipientResult(deliveryResults); server.StartListen(); // Add a route so we can connect to localhost. AddRoutePointingAtLocalhost(2, smtpServerPort, false); // Send message to this route. var smtp = new SMTPClientSimulator(); var recipients = new List <string>(); recipients.Add("*****@*****.**"); recipients.Add("*****@*****.**"); recipients.Add("*****@*****.**"); if (!smtp.Send("*****@*****.**", recipients, "Test", "Test message")) { CustomAssert.Fail("Delivery failed"); } // Wait for the client to disconnect. server.WaitForCompletion(); // Trigger a sending of the bounce message. TestSetup.AssertRecipientsInDeliveryQueue(1); CustomAssert.AreEqual(-1, _status.UndeliveredMessages.IndexOf("*****@*****.**")); CustomAssert.AreEqual(-1, _status.UndeliveredMessages.IndexOf("*****@*****.**")); CustomAssert.AreNotEqual(-1, _status.UndeliveredMessages.IndexOf("*****@*****.**")); CustomAssert.IsTrue(server.MessageData.Contains("Test message")); } // Attempt to deliver the message again. using (var server = new SMTPServerSimulator(1, smtpServerPort)) { server.AddRecipientResult(deliveryResults); server.StartListen(); TestSetup.SendMessagesInQueue(); server.WaitForCompletion(); // TestSetup.AssertRecipientsInDeliveryQueue(0); string bounceMessage = POP3ClientSimulator.AssertGetFirstMessageText("*****@*****.**", "test"); CustomAssert.IsTrue(bounceMessage.Contains("400 [email protected]")); CustomAssert.IsTrue(bounceMessage.Contains("Tried 2 time(s)")); CustomAssert.IsFalse(bounceMessage.Contains("*****@*****.**")); CustomAssert.IsFalse(bounceMessage.Contains("*****@*****.**")); } }
public async Task WhenIWriteNewStreamWithMetadataAndNoEvents(string streamId, int events) { this.Context.HeaderMetadata = TestSetup.GetMetadata(); await WhenIWriteNewStreamWithEvents(streamId, events); }
public new void SetUp() { TestSetup.AssertSpamAssassinIsRunning(); }
private void ChitChat(TestSetup.ConnectionDetail actors, int rounds = 100) { var testData = ByteString.Create(new[] {(byte) 0}); Enumerable.Range(1, rounds).ForEach(_ => { actors.ClientHandler.Send(actors.ClientConnection, Tcp.Write.Create(testData)); actors.ServerHandler.ExpectMsg<Tcp.Received>(x => x.Data.Count == 1 && x.Data.Head == 0); actors.ServerHandler.Send(actors.ServerConnection, Tcp.Write.Create(testData)); actors.ClientHandler.ExpectMsg<Tcp.Received>(x => x.Data.Count == 1 && x.Data.Head == 0); }); }
public ListenerParent(TestSetup test, bool pullMode) { _test = test; _pullMode = pullMode; _listner = Context.ActorOf(Props.Create(() => new TcpListener(test._selectorRouter.Ref, Tcp.Instance.Apply(Context.System), this, test._bindCommander.Ref, new Tcp.Bind(_test._handler.Ref, test._endpoint, 100, new Inet.SocketOption[]{}, pullMode))) .WithDeploy(Deploy.Local)); _test._parent.Watch(_listner); }