Skip to content

Commit

Permalink
Stop running tests on .NET 7 and run tests on .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
karolz-ms committed Jul 26, 2024
1 parent 5158cb7 commit 86b86b8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Microsoft.Diagnostics.EventFlow.Filters;
using Microsoft.Diagnostics.EventFlow.HealthReporters;
using Microsoft.Diagnostics.EventFlow.Inputs;
#if NET7_0 || NET6_0 || NETCOREAPP2_1 || NETCOREAPP3_1
#if NET8_0 || NET6_0 || NETCOREAPP2_1 || NETCOREAPP3_1
using Microsoft.Diagnostics.EventFlow.Inputs.ActivitySource;
#endif
using Microsoft.Diagnostics.EventFlow.Metadata;
Expand Down Expand Up @@ -512,7 +512,7 @@ public void CanCreateAllStandardPipelineItems()
""schemaVersion"": ""2016-08-11""
}";
#elif NET6_0 || NET7_0
#elif NET6_0 || NET8_0
string pipelineConfiguration = @"
{
""inputs"": [
Expand Down Expand Up @@ -598,14 +598,14 @@ public void CanCreateAllStandardPipelineItems()
, i => Assert.IsType<PerformanceCounterInput>(i)
, i => Assert.IsType<EtwInput>(i)
#endif
#if NET7_0 || NET6_0 || NETCOREAPP2_1 || NETCOREAPP3_1
#if NET8_0 || NET6_0 || NETCOREAPP2_1 || NETCOREAPP3_1
, i => Assert.IsType<ActivitySourceInput>(i)
#endif
);

Assert.Collection(pipeline.Sinks,
s => Assert.IsType<StdOutput>(s.Output),
#if (!NET462 && !NET6_0 && !NET7_0)
#if (!NET462 && !NET6_0 && !NET8_0)
s => Assert.IsType<ElasticSearchOutput>(s.Output),
#endif
s => Assert.IsType<OmsOutput>(s.Output),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public void RequestDataReadSuccessfully()
Assert.Equal("200 OK", rd.ResponseCode);

// Note the TimeSpan.FromMilliseconds will round to the nearest millisecond on everything older than .NET Core 3.0
#if NETCOREAPP3_1 || NET6_0 || NET7_0
#if NETCOREAPP3_1 || NET6_0 || NET8_0
Assert.Equal(34.7, rd.Duration.Value.TotalMilliseconds, DoublePrecisionTolerance);
#else
Assert.Equal(35, rd.Duration.Value.TotalMilliseconds, DoublePrecisionTolerance);
Expand Down Expand Up @@ -155,7 +155,7 @@ public void RequestDataReadSuccessfully()
eventData.Payload["duration"] = 65.7;
result = RequestData.TryGetData(eventData, requestMetadata, out rd);
Assert.Equal(DataRetrievalStatus.Success, result.Status);
#if NETCOREAPP3_1 || NET6_0 || NET7_0
#if NETCOREAPP3_1 || NET6_0 || NET8_0
Assert.Equal(65.7, rd.Duration.Value.TotalMilliseconds, DoublePrecisionTolerance);
#else
Assert.Equal(66, rd.Duration.Value.TotalMilliseconds, DoublePrecisionTolerance);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net471;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;net471;net6.0;net8.0</TargetFrameworks>
<AssemblyName>Microsoft.Diagnostics.EventFlow.Core.Tests</AssemblyName>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down Expand Up @@ -46,10 +46,10 @@
<ProjectReference Include="..\..\src\Microsoft.Diagnostics.EventFlow.Inputs.ActivitySource\Microsoft.Diagnostics.EventFlow.Inputs.ActivitySource.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<ProjectReference Include="..\..\src\Microsoft.Diagnostics.EventFlow.Inputs.ActivitySource\Microsoft.Diagnostics.EventFlow.Inputs.ActivitySource.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public async Task CapturesEventCountersFromEventSource()
Assert.Equal("EventCounters", data.Payload["EventName"]);
Assert.Equal("testCounter", data.Payload["Name"]);
Assert.Equal(2, data.Payload["Count"]);
#if NETCOREAPP3_1 || NET6_0 || NET7_0
#if NETCOREAPP3_1 || NET6_0 || NET8_0
Assert.Equal((double)5, data.Payload["Max"]);
Assert.Equal((double)1, data.Payload["Min"]);
#else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net471;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net471;net6.0;net8.0</TargetFrameworks>
<DebugType>portable</DebugType>
<AssemblyName>Microsoft.Diagnostics.EventFlow.Inputs.Tests</AssemblyName>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net471;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net471;net6.0;net8.0</TargetFrameworks>
<AssemblyName>Microsoft.Diagnostics.EventFlow.Outputs.Tests</AssemblyName>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<SignAssembly>true</SignAssembly>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net471;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net462;net471;net6.0;net8.0</TargetFrameworks>
<PlatformTarget>x64</PlatformTarget>
<DebugType>portable</DebugType>
<AssemblyName>Microsoft.Diagnostics.EventFlow.ServiceFabric.Tests</AssemblyName>
Expand Down

0 comments on commit 86b86b8

Please sign in to comment.