From 266076030a9be08c603b458451b7e54180603e17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 26 Jul 2017 13:03:52 +0200 Subject: [PATCH] [acceptance-tests] Another attempt fix a StringBuilder race in the profiler stress runner. --- acceptance-tests/profiler-stress/runner.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/acceptance-tests/profiler-stress/runner.cs b/acceptance-tests/profiler-stress/runner.cs index 05a1efb3514..e5d44e68b4a 100644 --- a/acceptance-tests/profiler-stress/runner.cs +++ b/acceptance-tests/profiler-stress/runner.cs @@ -201,8 +201,10 @@ namespace Mono.Profiling.Tests.Stress { result.Stopwatch.Stop (); - result.StandardOutput = stdout.ToString (); - result.StandardError = stderr.ToString (); + lock (result) { + result.StandardOutput = stdout.ToString (); + result.StandardError = stderr.ToString (); + } } var resultStr = result.ExitCode == null ? "timed out" : $"exited with code: {result.ExitCode}"; -- 2.25.1