protected RemoteService SetupDistributedTracingApplication() { var service = new RemoteService(ApplicationDirectoryName, ExecutableName, ApplicationType.Bounded, true, true, true); service.TestLogger = new XUnitTestLogger(TestLogger); service.DeleteWorkingSpace(); service.CopyToRemote(); SetSecrets(service.DestinationNewRelicConfigFilePath); var configModifier = new NewRelicConfigModifier(service.DestinationNewRelicConfigFilePath); configModifier.SetOrDeleteDistributedTraceEnabled(true); configModifier.SetOrDeleteSpanEventsEnabled(true); configModifier.SetLogLevel("all"); return(service); }
public MockNewRelicFixture(RemoteApplication remoteApplication) : base(remoteApplication) { MockNewRelicApplication = new RemoteService(ApplicationDirectoryName, ExecutableName, ApplicationType.Bounded, true, true, true); Actions( setupConfiguration: () => { //Always restore the New Relic config settings even if the mock collector is already running CommonUtils.ModifyOrCreateXmlAttributeInNewRelicConfig(DestinationNewRelicConfigFilePath, new[] { "configuration", "service" }, "host", "localhost"); CommonUtils.ModifyOrCreateXmlAttributeInNewRelicConfig(DestinationNewRelicConfigFilePath, new[] { "configuration", "service" }, "port", MockNewRelicApplication.Port.ToString(CultureInfo.InvariantCulture)); //Increase the timeout for requests to the mock collector to 5 seconds - default is 2 seconds. //This assists in timing issues when spinning up both the mock collector and test application. CommonUtils.ModifyOrCreateXmlAttributeInNewRelicConfig(DestinationNewRelicConfigFilePath, new[] { "configuration", "service" }, "requestTimeout", "5000"); if (MockNewRelicApplication.IsRunning) { return; } MockNewRelicApplication.TestLogger = new XUnitTestLogger(TestLogger); MockNewRelicApplication.DeleteWorkingSpace(); MockNewRelicApplication.CopyToRemote(); MockNewRelicApplication.Start(string.Empty, doProfile: false); ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; ServicePointManager.ServerCertificateValidationCallback = delegate { //force trust on all certificates for simplicity return(true); }; //Core apps need the collector warmed up before the core app is started so we cannot //wait until exerciseApplication is called to call these methods WarmUpCollector(); LogSslNegotiationMessage(); } ); }
public OwinRemotingFixture() : base(new RemoteService(ClientApplicationDirectoryName, ClientExecutableName, ApplicationType.Bounded)) { OwinRemotingServerApplication = new RemoteService(ServerApplicationDirectoryName, ServerExecutableName, ApplicationType.Bounded); OwinRemotingServerApplication.CopyToRemote(); OwinRemotingServerApplication.Start(string.Empty, captureStandardOutput: false, doProfile: false); }