Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-3049

Sporadic logging failures in unit tests

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.2.6
    • 3.2.5
    • library
    • None
    • 1

    Description

      Example:

      Error Message
      System.AggregateException : An error occurred while writing to logger(s). (There is no currently active test.)
      ---- System.InvalidOperationException : There is no currently active test.
      Stacktrace
      at Microsoft.Extensions.Logging.Logger.ThrowLoggingError(List`1 exceptions)
      at Microsoft.Extensions.Logging.Logger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter)
      at Microsoft.Extensions.Logging.Logger`1.Microsoft.Extensions.Logging.ILogger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter)
      at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, EventId eventId, Exception exception, String message, Object[] args)
      at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, String message, Object[] args)
      at Couchbase.UnitTests.Core.Diagnostics.Tracing.XUnitLoggerListener.<Start>b__2_1(Activity a) in C:\Jenkins\workspace\dotnet\sdk\couchbase-net-client-scripted-build-pipeline\couchbase-net-client\tests\Couchbase.UnitTests\Core\Diagnostics\Tracing\XUnitLoggerListener.cs:line 31
      at System.Diagnostics.ActivitySource.<>c.<NotifyActivityStop>b__21_0(ActivityListener listener, Object obj)
      at System.Diagnostics.SynchronizedList`1.EnumWithAction(Action`2 action, Object arg)
      at System.Diagnostics.ActivitySource.NotifyActivityStop(Activity activity)
      at System.Diagnostics.Activity.Stop()
      at Couchbase.Core.Diagnostics.Tracing.RequestSpan.End() in C:\Jenkins\workspace\dotnet\sdk\couchbase-net-client-scripted-build-pipeline\couchbase-net-client\src\Couchbase\Core\Diagnostics\Tracing\RequestSpan.cs:line 89
      at Couchbase.Core.Diagnostics.Tracing.RequestSpan.Dispose() in C:\Jenkins\workspace\dotnet\sdk\couchbase-net-client-scripted-build-pipeline\couchbase-net-client\src\Couchbase\Core\Diagnostics\Tracing\RequestSpan.cs:line 107
      at Couchbase.UnitTests.Core.Diagnostics.Tracing.Fakes.FakeCollection.GetAnyReplicaAsync(String id, GetAnyReplicaOptions options) in C:\Jenkins\workspace\dotnet\sdk\couchbase-net-client-scripted-build-pipeline\couchbase-net-client\tests\Couchbase.UnitTests\Core\Diagnostics\Tracing\Fakes\FakeCollection.cs:line 119
      at Couchbase.UnitTests.Core.Diagnostics.Tracing.ThresholdTracerTests.TestKeyValueTracing() in C:\Jenkins\workspace\dotnet\sdk\couchbase-net-client-scripted-build-pipeline\couchbase-net-client\tests\Couchbase.UnitTests\Core\Diagnostics\Tracing\ThresholdTracerTests.cs:line 77
      — End of stack trace from previous location —
      ----- Inner Stack Trace -----
      at Couchbase.UnitTests.Core.Utils.XUnitLogger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func`3 formatter) in C:\Jenkins\workspace\dotnet\sdk\couchbase-net-client-scripted-build-pipeline\couchbase-net-client\tests\Couchbase.UnitTests\Core\Utils\XUnitLoggerProvider.cs:line 40
      at Microsoft.Extensions.Logging.Logger.<Log>g__LoggerLog|12_0[TState](LogLevel logLevel, EventId eventId, ILogger logger, Exception exception, Func`3 formatter, List`1& exceptions, TState& state)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            btburnett3 Brant Burnett
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty