Skip to content

Commit f64d2b3

Browse files
committed
The same as 846d2e9
1 parent 671e175 commit f64d2b3

File tree

4 files changed

+16
-35
lines changed

4 files changed

+16
-35
lines changed

build.cake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Task("Test")
7979
.IsDependentOn("Compile")
8080
.Does(() =>
8181
{
82-
var projects = GetFiles("./test/DotNetty.Common.Tests/*.csproj")
82+
var projects = GetFiles("./test/**/*.csproj")
8383
- GetFiles("./test/**/*.Microbench.csproj")
8484
- GetFiles("./test/**/*.Performance.csproj");
8585

@@ -88,7 +88,7 @@ Task("Test")
8888
DotNetCoreTest(project.FullPath, new DotNetCoreTestSettings
8989
{
9090
Configuration = configuration//,
91-
//Verbosity = DotNetCoreVerbosity.Normal
91+
//Verbose = false
9292
});
9393

9494
// if (IsRunningOnWindows())

build.ps1

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ if (Get-Command dotnet -ErrorAction SilentlyContinue) {
2121
$FoundDotNetCliVersion = dotnet --version;
2222
}
2323

24-
#if($FoundDotNetCliVersion -ne $DotNetVersion) {
25-
# $InstallPath = Join-Path $PSScriptRoot ".dotnet"
26-
# if (!(Test-Path $InstallPath)) {
27-
# mkdir -Force $InstallPath | Out-Null;
28-
# }
29-
# (New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, "$InstallPath\dotnet-install.ps1");
30-
# & $InstallPath\dotnet-install.ps1 -Channel preview -Version $DotNetVersion -InstallDir $InstallPath;
31-
32-
# $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
33-
# $env:DOTNET_CLI_TELEMETRY_OPTOUT=1
34-
35-
# & dotnet --info
36-
#}
24+
if($FoundDotNetCliVersion -ne $DotNetVersion) {
25+
$InstallPath = Join-Path $PSScriptRoot ".dotnet"
26+
if (!(Test-Path $InstallPath)) {
27+
mkdir -Force $InstallPath | Out-Null;
28+
}
29+
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, "$InstallPath\dotnet-install.ps1");
30+
& $InstallPath\dotnet-install.ps1 -Channel preview -Version $DotNetVersion -InstallDir $InstallPath;
31+
32+
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
33+
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
34+
35+
& dotnet --info
36+
}
3737

3838
###########################################################################
3939
# INSTALL CAKE

test/DotNetty.Common.Tests/Internal/Logging/InternalLoggerFactoryTest.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,15 @@
44
namespace DotNetty.Common.Tests.Internal.Logging
55
{
66
using System;
7-
using System.Runtime.CompilerServices;
87
using DotNetty.Common.Internal.Logging;
98
using DotNetty.Tests.Common;
109
using Microsoft.Extensions.Logging;
1110
using Moq;
1211
using Xunit;
13-
using Xunit.Abstractions;
1412

1513
[CollectionDefinition(nameof(InternalLoggerFactoryTest), DisableParallelization = true)]
1614
public class InternalLoggerFactoryTest
1715
{
18-
/*protected readonly ITestOutputHelper Output;
19-
20-
public InternalLoggerFactoryTest(ITestOutputHelper output)
21-
{
22-
this.Output = output;
23-
}*/
2416
// todo: CodeContracts on CI
2517
//[Fact]
2618
//public void ShouldNotAllowNullDefaultFactory()
@@ -42,7 +34,6 @@ public void ShouldGetInstance()
4234
[Fact]
4335
public void TestMockReturned()
4436
{
45-
//Output.WriteLine("TestMockReturned, Pre:" + RuntimeHelpers.GetHashCode(InternalLoggerFactory.DefaultFactory));
4637
Mock<ILogger> mock;
4738
using (SetupMockLogger(out mock))
4839
{
@@ -52,28 +43,20 @@ public void TestMockReturned()
5243

5344
Assert.True(logger.TraceEnabled);
5445
mock.Verify(x => x.IsEnabled(LogLevel.Trace), Times.Once);
55-
//Output.WriteLine("TestMockReturned, Finish:" + RuntimeHelpers.GetHashCode(InternalLoggerFactory.DefaultFactory));
5646
}
57-
//Output.WriteLine("TestMockReturned, Post:" + RuntimeHelpers.GetHashCode(InternalLoggerFactory.DefaultFactory));
58-
//Assert.True(false, "To See The Log");
5947
}
6048

6149
static IDisposable SetupMockLogger(out Mock<ILogger> loggerMock)
6250
{
6351
ILoggerFactory oldLoggerFactory = InternalLoggerFactory.DefaultFactory;
64-
//Output.WriteLine($"SetupMockLogger,oldLoggerFactory={RuntimeHelpers.GetHashCode(oldLoggerFactory)}");
6552
var loggerFactory = new LoggerFactory();
66-
//Output.WriteLine($"SetupMockLogger,loggerFactory={RuntimeHelpers.GetHashCode(loggerFactory)}");
6753
var factoryMock = new Mock<ILoggerProvider>(MockBehavior.Strict);
6854
ILoggerProvider mockFactory = factoryMock.Object;
6955
loggerMock = new Mock<ILogger>(MockBehavior.Strict);
7056
loggerFactory.AddProvider(mockFactory);
7157
factoryMock.Setup(x => x.CreateLogger("mock")).Returns(loggerMock.Object);
7258
InternalLoggerFactory.DefaultFactory = loggerFactory;
73-
return new Disposable(() => {
74-
InternalLoggerFactory.DefaultFactory = oldLoggerFactory;
75-
//Output.WriteLine($"SetupMockLogger,Dispose to={RuntimeHelpers.GetHashCode(oldLoggerFactory)}");
76-
});
59+
return new Disposable(() => InternalLoggerFactory.DefaultFactory = oldLoggerFactory);
7760
}
7861
}
7962
}

test/DotNetty.Common.Tests/Utilities/HashedWheelTimerTest.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public void TestScheduleTimeoutShouldRunAfterDelay()
5454
[Fact] // (timeout = 3000)
5555
public void TestStopTimer()
5656
{
57-
//Output.WriteLine($"{System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode(DotNetty.Common.Internal.Logging.InternalLoggerFactory.DefaultFactory)}");
5857
var latch = new CountdownEvent(3);
5958
ITimer timerProcessed = new HashedWheelTimer();
6059
for (int i = 0; i < 3; i++)
@@ -78,7 +77,6 @@ public void TestStopTimer()
7877
}
7978
Thread.Sleep(1000); // sleep for a second
8079
Assert.NotEqual(0, timerUnprocessed.StopAsync().Result.Count); // Number of unprocessed timeouts should be greater than 0
81-
//Assert.True(false, "To See The Log");
8280
}
8381

8482
[Fact] // (timeout = 3000)

0 commit comments

Comments
 (0)