Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Castle.DynamicProxy;
using NUnit.Framework;
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal;

namespace Azure.Core.TestFramework
{
Expand Down Expand Up @@ -80,6 +79,7 @@ public T InstrumentClientOptions<T>(T clientOptions, TestRecording recording = d
protected string GetSessionFilePath()
{
TestContext.TestAdapter testAdapter = TestContext.CurrentContext.Test;

string name = new string(testAdapter.Name.Select(c => s_invalidChars.Contains(c) ? '%' : c).ToArray());
string additionalParameterName = testAdapter.Properties.ContainsKey(ClientTestFixtureAttribute.RecordingDirectorySuffixKey) ?
testAdapter.Properties.Get(ClientTestFixtureAttribute.RecordingDirectorySuffixKey).ToString() :
Expand Down Expand Up @@ -153,13 +153,6 @@ public virtual void StartTestRecording()
[TearDown]
public virtual void StopTestRecording()
{
if (TestEnvironment.GlobalIsRunningInCI)
{
var tempFileName = Path.GetTempFileName() + ".txt";
File.WriteAllText(tempFileName, TestExecutionContext.CurrentContext.CurrentResult.Output);
TestContext.AddTestAttachment(tempFileName, "Test Output");
}

bool testPassed = TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Passed;

if (ValidateClientInstrumentation && testPassed)
Expand Down