From 337fcf71350785af4ea078e21c6207fc882e81c1 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Mon, 19 Dec 2022 18:07:07 +0530 Subject: [PATCH] import cleanup --- .../Tracing/AssertActivity.cs | 10 ++++++---- .../Tracing/CustomListener.cs | 2 +- .../Tracing/EndToEndTraceWriterBaselineTests.cs | 6 +++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs index fb990a4627..878f2914b8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -1,10 +1,12 @@ -namespace Microsoft.Azure.Cosmos.Tracing +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Tracing { - using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; - using Castle.Core.Internal; using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Cosmos.Tests; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -16,7 +18,7 @@ public static void IsValid(Activity activity) { Assert.IsTrue(activity.OperationName == activity.DisplayName); - Assert.IsFalse(activity.GetTagItem("db.cosmosdb.connection_mode").ToString().IsNullOrEmpty(), $"connection mode is emtpy for {activity.OperationName}"); + Assert.IsFalse(string.IsNullOrEmpty(activity.GetTagItem("db.cosmosdb.connection_mode").ToString()), $"connection mode is emtpy for {activity.OperationName}"); if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Gateway.ToString()) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index 0eb0ac26a8..82b2011c27 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Cosmos.Tests /// /// It is a custom listener for Activities and Event. It is used to validate the Activities generated by cosmosDb SDK. /// - public class CustomListener : + internal class CustomListener : EventListener, // Override Event Listener to capture Event source events IObserver>, // Override IObserver to capture Activity events IObserver, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index 0b2db455b6..22b4be1814 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -1,4 +1,8 @@ -namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing { using System; using System.Collections.Generic;