Skip to content

Commit

Permalink
fix data to string from buffer for output channel (#21821)
Browse files Browse the repository at this point in the history
fix #21820
  • Loading branch information
eleanorjboyd authored Aug 16, 2023
1 parent 5140a8d commit 96ba735
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/client/testing/testController/common/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ export class PythonTestServer implements ITestServer, Disposable {
// Take all output from the subprocess and add it to the test output channel. This will be the pytest output.
// Displays output to user and ensure the subprocess doesn't run into buffer overflow.
result?.proc?.stdout?.on('data', (data) => {
spawnOptions?.outputChannel?.append(data);
spawnOptions?.outputChannel?.append(data.toString());
});
result?.proc?.stderr?.on('data', (data) => {
spawnOptions?.outputChannel?.append(data);
spawnOptions?.outputChannel?.append(data.toString());
});
result?.proc?.on('exit', () => {
traceLog('Exec server closed.', uuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ export class PytestTestDiscoveryAdapter implements ITestDiscoveryAdapter {
// Take all output from the subprocess and add it to the test output channel. This will be the pytest output.
// Displays output to user and ensure the subprocess doesn't run into buffer overflow.
result?.proc?.stdout?.on('data', (data) => {
spawnOptions.outputChannel?.append(data);
spawnOptions.outputChannel?.append(data.toString());
});
result?.proc?.stderr?.on('data', (data) => {
spawnOptions.outputChannel?.append(data);
spawnOptions.outputChannel?.append(data.toString());
});
result?.proc?.on('exit', () => {
deferredExec.resolve({ stdout: '', stderr: '' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter {
// Take all output from the subprocess and add it to the test output channel. This will be the pytest output.
// Displays output to user and ensure the subprocess doesn't run into buffer overflow.
result?.proc?.stdout?.on('data', (data) => {
this.outputChannel?.append(data);
this.outputChannel?.append(data.toString());
});
result?.proc?.stderr?.on('data', (data) => {
this.outputChannel?.append(data);
this.outputChannel?.append(data.toString());
});

result?.proc?.on('exit', () => {
Expand Down

0 comments on commit 96ba735

Please sign in to comment.