Skip to content

Capture gRPC interop test client output #22163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2020

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented May 22, 2020

Write client output when an error occurs (or timeout) to help debugging

re: #22145 & #22102

@JamesNK JamesNK requested review from JunTaoLuo and dougbu May 22, 2020 21:56
@JamesNK JamesNK changed the title Capture interop test client output Capture gRPC interop test client output May 22, 2020
Copy link
Contributor

@dougbu dougbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestion and a question but no need for me to review again

@@ -15,9 +16,13 @@ public class ClientProcess : IDisposable
private readonly Process _process;
private readonly ProcessEx _processEx;
private readonly TaskCompletionSource<object> _startTcs;
private readonly StringBuilder _output;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest cleaning this object up in Dispose()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will get GCed with ClientProcess so I'm not worried about it

{
lock (_outputLock)
{
_output.AppendLine(data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should error and regular output be distinguished in the buffer e.g. with an ERROR: prefix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only error output would be if an exception is thrown, and it should be obvious. Will change in the future if it is confusing.

@JamesNK JamesNK merged commit d58947f into master May 22, 2020
@JamesNK JamesNK deleted the jamesnk/interoptest-clientoutput branch May 22, 2020 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants