Skip to content

Commit 1517b4f

Browse files
author
John Luo
authored
Remove Serilog dependency in extensions (dotnet/extensions#3040)
* Remove Serilog dependency in extensions * Add xunit logging for shutdown tests * Need to remove dependency on AspNetCore.Testing and remove DumpCollector\n\nCommit migrated from dotnet/extensions@540b4e8
1 parent 5cb0eb0 commit 1517b4f

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

src/Caching/Memory/test/CapacityTests.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -12,7 +12,7 @@
1212

1313
namespace Microsoft.Extensions.Caching.Memory
1414
{
15-
public class CapacityTests : LoggedTestBase
15+
public class CapacityTests
1616
{
1717
[Fact]
1818
public void MemoryDistributedCacheOptionsDefaultsTo200MBSizeLimit()
@@ -112,13 +112,9 @@ public void DoNotAddEntryIfItExceedsCapacity()
112112
}
113113

114114
[Fact]
115-
[CollectDump]
116115
public async Task DoNotAddIfSizeOverflows()
117116
{
118-
var cache = new MemoryCache(new MemoryCacheOptions
119-
{
120-
SizeLimit = long.MaxValue
121-
}, LoggerFactory);
117+
var cache = new MemoryCache(new MemoryCacheOptions { SizeLimit = long.MaxValue });
122118

123119
var entryOptions = new MemoryCacheEntryOptions { Size = long.MaxValue };
124120
var sem = new SemaphoreSlim(0, 1);
@@ -148,7 +144,6 @@ public async Task DoNotAddIfSizeOverflows()
148144
}
149145

150146
[Fact]
151-
[CollectDump]
152147
public async Task ExceedsCapacityCompacts()
153148
{
154149
var cache = new MemoryCache(new MemoryCacheOptions
@@ -242,7 +237,6 @@ public void AddingReplacementWhenTotalSizeExceedsCapacityDoesNotUpdateAndRemoves
242237
}
243238

244239
[Fact]
245-
[CollectDump]
246240
public async Task AddingReplacementWhenTotalSizeExceedsCapacityDoesNotUpdateRemovesOldEntryAndTriggersCompaction()
247241
{
248242
var cache = new MemoryCache(new MemoryCacheOptions
@@ -312,7 +306,6 @@ public void RemovingEntryDecreasesCacheSize()
312306
}
313307

314308
[Fact]
315-
[CollectDump]
316309
public async Task ExpiringEntryDecreasesCacheSize()
317310
{
318311
var cache = new MemoryCache(new MemoryCacheOptions
@@ -348,7 +341,6 @@ public async Task ExpiringEntryDecreasesCacheSize()
348341
}
349342

350343
[Fact]
351-
[CollectDump]
352344
public async Task CompactsToLessThanLowWatermarkUsingLRUWhenHighWatermarkExceeded()
353345
{
354346
var testClock = new TestClock();

src/Caching/Memory/test/Microsoft.Extensions.Caching.Memory.Tests.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<Import Project="$(MSBuildThisFileDirectory)..\..\..\Logging\Logging.Testing\src\build\Microsoft.Extensions.Logging.Testing.props" />
4-
53
<PropertyGroup>
64
<TargetFrameworks>$(DefaultNetCoreTargetFramework);net472</TargetFrameworks>
75
</PropertyGroup>

0 commit comments

Comments
 (0)