Example #1
0
 public void OperationMethodThatCallsAnotherServiceDoesNotLoseOperationContext()
 {
     TestTelemetryChannel.Clear();
     using (var host = new HostingContext <SimpleService, ISimpleService>())
         using (var hostSecond = new HostingContext <SimpleService, ISimpleService>())
         {
             host.IncludeDetailsInFaults();
             host.Open();
             hostSecond.Open();
             ISimpleService client = host.GetChannel();
             client.CallAnotherServiceAndLeakOperationContext(hostSecond.GetServiceAddress());
             Assert.IsTrue(TestTelemetryChannel.CollectedData().Count > 0);
         }
 }