Merge branch 'master' into merge/release/3.1-to-master
This commit is contained in:
commit
eabf15bfe9
|
|
@ -28,13 +28,13 @@ namespace Microsoft.Extensions.Logging.AzureAppServices
|
|||
public int? BackgroundQueueSize { get { throw null; } set { } }
|
||||
public int? BatchSize { get { throw null; } set { } }
|
||||
public System.TimeSpan FlushPeriod { get { throw null; } set { } }
|
||||
public bool IncludeScopes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public bool IsEnabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public bool IncludeScopes { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public bool IsEnabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
public abstract partial class BatchingLoggerProvider : Microsoft.Extensions.Logging.ILoggerProvider, Microsoft.Extensions.Logging.ISupportExternalScope, System.IDisposable
|
||||
{
|
||||
internal BatchingLoggerProvider() { }
|
||||
public bool IsEnabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
|
||||
public bool IsEnabled { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } }
|
||||
public Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName) { throw null; }
|
||||
public void Dispose() { }
|
||||
protected virtual System.Threading.Tasks.Task IntervalAsync(System.TimeSpan interval, System.Threading.CancellationToken cancellationToken) { throw null; }
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ namespace Microsoft.Extensions.Logging.Testing
|
|||
|
||||
// Try to clear previous logs, continue if it fails.
|
||||
var assemblyBaseDirectory = TestFileOutputContext.GetAssemblyBaseDirectory(assembly);
|
||||
if (!string.IsNullOrEmpty(assemblyBaseDirectory))
|
||||
if (!string.IsNullOrEmpty(assemblyBaseDirectory) && !TestFileOutputContext.GetPreserveExistingLogsInOutput(assembly))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ namespace Microsoft.Extensions.Logging.Testing
|
|||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
public class TestFrameworkFileLoggerAttribute : TestOutputDirectoryAttribute
|
||||
{
|
||||
public TestFrameworkFileLoggerAttribute(string tfm, string baseDirectory = null)
|
||||
: base(tfm, baseDirectory)
|
||||
public TestFrameworkFileLoggerAttribute(string preserveExistingLogsInOutput, string tfm, string baseDirectory = null)
|
||||
: base(preserveExistingLogsInOutput, tfm, baseDirectory)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@
|
|||
<Target Name="SetLoggingTestingAssemblyAttributes"
|
||||
BeforeTargets="GetAssemblyAttributes"
|
||||
Condition="'$(GenerateLoggingTestingAssemblyAttributes)' != 'false'">
|
||||
<PropertyGroup>
|
||||
<PreserveExistingLogsInOutput Condition="'$(PreserveExistingLogsInOutput)' == '' AND '$(ContinuousIntegrationBuild)' == 'true'">true</PreserveExistingLogsInOutput>
|
||||
<PreserveExistingLogsInOutput Condition="'$(PreserveExistingLogsInOutput)' == ''">false</PreserveExistingLogsInOutput>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AssemblyAttribute Include="Xunit.TestFramework">
|
||||
<_Parameter1>Microsoft.AspNetCore.Testing.AspNetTestFramework</_Parameter1>
|
||||
|
|
@ -16,8 +21,9 @@
|
|||
</AssemblyAttribute>
|
||||
|
||||
<AssemblyAttribute Include="Microsoft.Extensions.Logging.Testing.TestFrameworkFileLoggerAttribute">
|
||||
<_Parameter1>$(TargetFramework)</_Parameter1>
|
||||
<_Parameter2 Condition="'$(LoggingTestingDisableFileLogging)' != 'true'">$(LoggingTestingFileLoggingDirectory)</_Parameter2>
|
||||
<_Parameter1>$(PreserveExistingLogsInOutput)</_Parameter1>
|
||||
<_Parameter2>$(TargetFramework)</_Parameter2>
|
||||
<_Parameter3 Condition="'$(LoggingTestingDisableFileLogging)' != 'true'">$(LoggingTestingFileLoggingDirectory)</_Parameter3>
|
||||
</AssemblyAttribute>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using System.Reflection;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Testing;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.Extensions.Logging.Testing.Tests
|
||||
|
|
@ -18,6 +19,17 @@ namespace Microsoft.Extensions.Logging.Testing.Tests
|
|||
private static readonly string ThisAssemblyName = ThisAssembly.GetName().Name;
|
||||
private static readonly string TFM = new DirectoryInfo(AppContext.BaseDirectory).Name;
|
||||
|
||||
[Fact]
|
||||
public void FunctionalLogs_LogsPreservedFromNonFlakyRun()
|
||||
{
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[Flaky("http://example.com", FlakyOn.All)]
|
||||
public void FunctionalLogs_LogsPreservedFromFlakyRun()
|
||||
{
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ForAssembly_ReturnsSameInstanceForSameAssembly()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue