public void CanCreateMessageQueueUsingNNPrimitives() { var cancelSource = new CancellationTokenSource(); Debug.WriteLine("Executing ReqRep test"); var responseThread = new Thread(() => NNPrimitivesRequestReplyProcesses.Response(cancelSource.Token)); responseThread.Start(); NNPrimitivesRequestReplyProcesses.Request(); cancelSource.Cancel(); }
public void CanDoSuccessiveRequestReplies() { var cancelSource = new CancellationTokenSource(); Debug.WriteLine("Executing ReqRep test"); var responseThread = new Thread(() => NNPrimitivesRequestReplyProcesses.Response(cancelSource.Token)); responseThread.Start(); Assert.IsTrue(responseThread.IsAlive); NNPrimitivesRequestReplyProcesses.Request(); Debug.WriteLine(String.Empty); Assert.IsTrue(responseThread.IsAlive); NNPrimitivesRequestReplyProcesses.Request(); cancelSource.Cancel(); }