Skip to content

Commit

Permalink
Fix integration test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
nr-ahemsath committed Nov 13, 2024
1 parent 8a0ad5b commit 5948fce
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -26,7 +26,7 @@
<None Include="local.settings.json" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.23.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.3.2" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.3.2" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues" Version="5.5.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.18.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ private static async Task Main(string[] args)


var host = new HostBuilder()
// the net6 target uses the "basic" azure function configuration
// the net8 target uses the aspnetcore azure function configuration
#if NET6_0
.ConfigureFunctionsWorkerDefaults()
#else
.ConfigureFunctionsWebApplication()
#endif
.Build();

var task = host.RunAsync(cts.Token);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@ public ConsoleDynamicMethodFixtureFWSpecificVersion(string targetFramework) : ba
}
}

public class ConsoleDynamicMethodFixtureCore60 : ConsoleDynamicMethodFixtureCoreSpecificVersion
{
public ConsoleDynamicMethodFixtureCore60() : base("net6.0")
{
}
}

public class ConsoleDynamicMethodFixtureCore80 : ConsoleDynamicMethodFixtureCoreSpecificVersion
{
public ConsoleDynamicMethodFixtureCore80() : base("net8.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ public MassTransitTests_StartHost_FWLatest(ConsoleDynamicMethodFixtureFWLatest f
}
}
[NetCoreTest]
public class MassTransitTests_StartHost_Core60 : MassTransitTestsBase<ConsoleDynamicMethodFixtureCore60>
public class MassTransitTests_StartHost_CoreOldest : MassTransitTestsBase<ConsoleDynamicMethodFixtureCoreOldest>
{
public MassTransitTests_StartHost_Core60(ConsoleDynamicMethodFixtureCore60 fixture, ITestOutputHelper output)
public MassTransitTests_StartHost_CoreOldest(ConsoleDynamicMethodFixtureCoreOldest fixture, ITestOutputHelper output)
: base(fixture, output, false)
{
}
Expand Down Expand Up @@ -142,9 +142,9 @@ public MassTransitTests_StartBus_FWLatest(ConsoleDynamicMethodFixtureFWLatest fi
}
}
[NetCoreTest]
public class MassTransitTests_StartBus_Core60 : MassTransitTestsBase<ConsoleDynamicMethodFixtureCore60>
public class MassTransitTests_StartBus_CoreOldest : MassTransitTestsBase<ConsoleDynamicMethodFixtureCoreOldest>
{
public MassTransitTests_StartBus_Core60(ConsoleDynamicMethodFixtureCore60 fixture, ITestOutputHelper output)
public MassTransitTests_StartBus_CoreOldest(ConsoleDynamicMethodFixtureCoreOldest fixture, ITestOutputHelper output)
: base(fixture, output, true)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.1" Condition="'$(TargetFramework)' == 'net48'" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.2" Condition="'$(TargetFramework)' == 'net8.0'" />

<!--Package will not be supported beyond .NET 8: https://techcommunity.microsoft.com/blog/sqlserver/announcement-system-data-sqlclient-package-is-now-deprecated/4227205-->
<PackageReference Include="System.Data.SqlClient" Version="4.9.0" Condition="'$(TargetFramework)' == 'net8.0'" />

<!-- MySql.Data framework references -->
<PackageReference Include="MySql.Data" Version="6.10.7" Condition="'$(TargetFramework)' == 'net462'" />
<PackageReference Include="MySql.Data" Version="8.0.15" Condition="'$(TargetFramework)' == 'net471'" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// Copyright 2020 New Relic, Inc. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

#if NETCOREAPP3_1_OR_GREATER && !NET8_0_OR_GREATER
// System.Data.SqlClient is being deprecated: https://techcommunity.microsoft.com/blog/sqlserver/announcement-system-data-sqlclient-package-is-now-deprecated/4227205
// This exerciser and the related tests should be deleted after .NET 8.0 EOL
#if NETCOREAPP3_1_OR_GREATER && !NET9_0_OR_GREATER
#pragma warning disable CS0618 // Type or member is obsolete

using System.Collections.Generic;
using System.Linq;
Expand All @@ -14,6 +17,7 @@
using NewRelic.Api.Agent;
using System.Threading;


namespace MultiFunctionApplicationHelpers.NetStandardLibraries.MsSql
{
[Library]
Expand Down Expand Up @@ -332,5 +336,5 @@ private void EnsureProcedure(string procedureName, DbParameter[] dbParameters)
}
}
}

#pragma warning restore CS0618 // Type or member is obsolete
#endif

0 comments on commit 5948fce

Please sign in to comment.