From bf7299726da4ede96cb1218591b7eca7f12059b3 Mon Sep 17 00:00:00 2001 From: Miguel Costa Date: Thu, 21 Nov 2024 01:46:37 +0000 Subject: [PATCH] feat: upgrade to dotnet8.0 --- KafkaFlow.sln | 7 +++++++ docker-compose.yml | 16 ++++++++-------- .../KafkaFlow.Sample.BatchOperations.csproj | 4 ++-- .../KafkaFlow.Sample.ConsumerThrottling.csproj | 6 +++--- .../KafkaFlow.Sample.Dashboard.csproj | 2 +- .../KafkaFlow.Sample.FlowControl.csproj | 5 ++--- .../KafkaFlow.Sample.OpenTelemetry.csproj | 12 ++++++------ ...afkaFlow.Sample.PauseConsumerOnError.csproj | 4 ++-- .../KafkaFlow.Sample.SchemaRegistry.csproj | 4 ++-- .../KafkaFlow.Sample.WebApi.csproj | 8 ++++---- .../KafkaFlow.Sample.WildcardConsumer.csproj | 7 ++----- .../Program.cs | 4 ++-- .../KafkaFlow.Sample/KafkaFlow.Sample.csproj | 4 ++-- .../Configuration/SaslOauthbearerMethod.cs | 17 ++++++++--------- .../KafkaFlow.Abstractions.csproj | 4 ++-- .../KafkaFlow.Admin.Dashboard.csproj | 4 ++-- .../KafkaFlow.Admin.WebApi.csproj | 2 +- .../KafkaFlow.Compressor.Gzip.csproj | 1 + .../KafkaFlow.Extensions.Hosting.csproj | 2 +- .../KafkaFlow.LogHandler.Console.csproj | 2 +- .../KafkaFlow.LogHandler.Microsoft.csproj | 4 ++-- ...kaFlow.Microsoft.DependencyInjection.csproj | 2 +- .../ActivitySourceAccessor.cs | 13 ++++++------- .../KafkaFlow.OpenTelemetry.csproj | 5 +---- .../KafkaFlow.SchemaRegistry.csproj | 2 +- .../KafkaFlow.Serializer.JsonCore.csproj | 2 +- .../KafkaFlow.Serializer.ProtobufNet.csproj | 2 +- ...ializer.SchemaRegistry.ConfluentAvro.csproj | 8 ++++---- ...ializer.SchemaRegistry.ConfluentJson.csproj | 2 +- ...zer.SchemaRegistry.ConfluentProtobuf.csproj | 2 +- src/KafkaFlow.Unity/KafkaFlow.Unity.csproj | 2 +- src/KafkaFlow/KafkaFlow.csproj | 8 ++++---- .../KafkaFlow.IntegrationTests.csproj | 18 +++++++++--------- .../CompressorConsumerMiddlewareTests.cs | 2 +- .../ConsumerConfigurationBuilderTests.cs | 2 +- .../KafkaFlow.UnitTests.csproj | 14 +++++++------- .../SerializerConsumerMiddlewareTests.cs | 2 +- .../TypedHandler/HandlerTypeMappingTests.cs | 8 ++++++-- 38 files changed, 108 insertions(+), 105 deletions(-) diff --git a/KafkaFlow.sln b/KafkaFlow.sln index a591122dc..b75b9aadb 100644 --- a/KafkaFlow.sln +++ b/KafkaFlow.sln @@ -96,6 +96,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KafkaFlow.Sample.OpenTelemetry", "samples\KafkaFlow.Sample.OpenTelemetry\KafkaFlow.Sample.OpenTelemetry.csproj", "{E9E8B374-4165-45F2-8DF5-F141E141AC1D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KafkaFlow.Sample.WildcardConsumer", "samples\KafkaFlow.Sample.WildcardConsumer\KafkaFlow.Sample.WildcardConsumer.csproj", "{8F6CDF12-5316-4AAF-A1F1-264337585698}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -222,6 +224,10 @@ Global {E9E8B374-4165-45F2-8DF5-F141E141AC1D}.Debug|Any CPU.Build.0 = Debug|Any CPU {E9E8B374-4165-45F2-8DF5-F141E141AC1D}.Release|Any CPU.ActiveCfg = Release|Any CPU {E9E8B374-4165-45F2-8DF5-F141E141AC1D}.Release|Any CPU.Build.0 = Release|Any CPU + {8F6CDF12-5316-4AAF-A1F1-264337585698}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F6CDF12-5316-4AAF-A1F1-264337585698}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F6CDF12-5316-4AAF-A1F1-264337585698}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F6CDF12-5316-4AAF-A1F1-264337585698}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -265,6 +271,7 @@ Global {1755E8DB-970C-4A24-8B7C-A2BEC1410BEE} = {7A9B997B-DAAC-4004-94F3-32F6B88E0068} {80080C1D-579E-4AB2-935D-5CFFC51843D8} = {7A9B997B-DAAC-4004-94F3-32F6B88E0068} {E9E8B374-4165-45F2-8DF5-F141E141AC1D} = {303AE78F-6C96-4DF4-AC89-5C4FD53AFF0B} + {8F6CDF12-5316-4AAF-A1F1-264337585698} = {303AE78F-6C96-4DF4-AC89-5C4FD53AFF0B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {6AE955B5-16B0-41CF-9F12-66D15B3DD1AB} diff --git a/docker-compose.yml b/docker-compose.yml index 8764803ce..277010328 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: zookeeper: - image: confluentinc/cp-zookeeper:7.2.1 + image: confluentinc/cp-zookeeper:7.7.1 hostname: zookeeper container_name: zookeeper ports: @@ -10,9 +10,9 @@ services: environment: ZOOKEEPER_CLIENT_PORT: 2181 ZOOKEEPER_TICK_TIME: 2000 - + broker: - image: confluentinc/cp-server:7.2.1 + image: confluentinc/cp-server:7.7.1 hostname: broker container_name: broker depends_on: @@ -44,9 +44,9 @@ services: interval: 10s timeout: 5s retries: 5 - + schema-registry: - image: confluentinc/cp-schema-registry:7.2.1 + image: confluentinc/cp-schema-registry:7.7.1 hostname: schema-registry container_name: schema-registry depends_on: @@ -58,10 +58,10 @@ services: SCHEMA_REGISTRY_HOST_NAME: schema-registry SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'broker:29092' SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081 - + kafka-tools: - image: confluentinc/cp-kafka:7.0.5 + image: confluentinc/cp-kafka:7.7.1 hostname: kafka container_name: kafka command: ["tail", "-f", "/dev/null"] - network_mode: "host" \ No newline at end of file + network_mode: "host" diff --git a/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj b/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj index 6336785ab..8ac90b0b0 100644 --- a/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj +++ b/samples/KafkaFlow.Sample.BatchOperations/KafkaFlow.Sample.BatchOperations.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 false false true @@ -17,7 +17,7 @@ - + diff --git a/samples/KafkaFlow.Sample.ConsumerThrottling/KafkaFlow.Sample.ConsumerThrottling.csproj b/samples/KafkaFlow.Sample.ConsumerThrottling/KafkaFlow.Sample.ConsumerThrottling.csproj index 3f2204ac3..70fbad02c 100644 --- a/samples/KafkaFlow.Sample.ConsumerThrottling/KafkaFlow.Sample.ConsumerThrottling.csproj +++ b/samples/KafkaFlow.Sample.ConsumerThrottling/KafkaFlow.Sample.ConsumerThrottling.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 false false true @@ -25,8 +25,8 @@ - - + + diff --git a/samples/KafkaFlow.Sample.Dashboard/KafkaFlow.Sample.Dashboard.csproj b/samples/KafkaFlow.Sample.Dashboard/KafkaFlow.Sample.Dashboard.csproj index 80eed6be1..c71b81066 100644 --- a/samples/KafkaFlow.Sample.Dashboard/KafkaFlow.Sample.Dashboard.csproj +++ b/samples/KafkaFlow.Sample.Dashboard/KafkaFlow.Sample.Dashboard.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false true diff --git a/samples/KafkaFlow.Sample.FlowControl/KafkaFlow.Sample.FlowControl.csproj b/samples/KafkaFlow.Sample.FlowControl/KafkaFlow.Sample.FlowControl.csproj index 20946db23..6c40a4352 100644 --- a/samples/KafkaFlow.Sample.FlowControl/KafkaFlow.Sample.FlowControl.csproj +++ b/samples/KafkaFlow.Sample.FlowControl/KafkaFlow.Sample.FlowControl.csproj @@ -2,10 +2,9 @@ Exe - net6.0 + net8.0 false false - 10 true @@ -18,7 +17,7 @@ - + diff --git a/samples/KafkaFlow.Sample.OpenTelemetry/KafkaFlow.Sample.OpenTelemetry.csproj b/samples/KafkaFlow.Sample.OpenTelemetry/KafkaFlow.Sample.OpenTelemetry.csproj index b2400f211..7f3837678 100644 --- a/samples/KafkaFlow.Sample.OpenTelemetry/KafkaFlow.Sample.OpenTelemetry.csproj +++ b/samples/KafkaFlow.Sample.OpenTelemetry/KafkaFlow.Sample.OpenTelemetry.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 false false true @@ -10,11 +10,11 @@ - - - - - + + + + + diff --git a/samples/KafkaFlow.Sample.PauseConsumerOnError/KafkaFlow.Sample.PauseConsumerOnError.csproj b/samples/KafkaFlow.Sample.PauseConsumerOnError/KafkaFlow.Sample.PauseConsumerOnError.csproj index 7a55c9fd7..fa57c3f89 100644 --- a/samples/KafkaFlow.Sample.PauseConsumerOnError/KafkaFlow.Sample.PauseConsumerOnError.csproj +++ b/samples/KafkaFlow.Sample.PauseConsumerOnError/KafkaFlow.Sample.PauseConsumerOnError.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 enable enable false @@ -18,7 +18,7 @@ - + diff --git a/samples/KafkaFlow.Sample.SchemaRegistry/KafkaFlow.Sample.SchemaRegistry.csproj b/samples/KafkaFlow.Sample.SchemaRegistry/KafkaFlow.Sample.SchemaRegistry.csproj index ddef38718..0ad4be31e 100644 --- a/samples/KafkaFlow.Sample.SchemaRegistry/KafkaFlow.Sample.SchemaRegistry.csproj +++ b/samples/KafkaFlow.Sample.SchemaRegistry/KafkaFlow.Sample.SchemaRegistry.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 false false KafkaFlow.Sample.SchemaRegistry @@ -28,7 +28,7 @@ - + diff --git a/samples/KafkaFlow.Sample.WebApi/KafkaFlow.Sample.WebApi.csproj b/samples/KafkaFlow.Sample.WebApi/KafkaFlow.Sample.WebApi.csproj index bf85308d2..7083335d4 100644 --- a/samples/KafkaFlow.Sample.WebApi/KafkaFlow.Sample.WebApi.csproj +++ b/samples/KafkaFlow.Sample.WebApi/KafkaFlow.Sample.WebApi.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false true enable @@ -25,9 +25,9 @@ - - - + + + diff --git a/samples/KafkaFlow.Sample.WildcardConsumer/KafkaFlow.Sample.WildcardConsumer.csproj b/samples/KafkaFlow.Sample.WildcardConsumer/KafkaFlow.Sample.WildcardConsumer.csproj index 05d9e4f29..4e722a164 100644 --- a/samples/KafkaFlow.Sample.WildcardConsumer/KafkaFlow.Sample.WildcardConsumer.csproj +++ b/samples/KafkaFlow.Sample.WildcardConsumer/KafkaFlow.Sample.WildcardConsumer.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 enable enable @@ -10,18 +10,15 @@ - - - - + diff --git a/samples/KafkaFlow.Sample.WildcardConsumer/Program.cs b/samples/KafkaFlow.Sample.WildcardConsumer/Program.cs index 32d13df22..e37a712d0 100644 --- a/samples/KafkaFlow.Sample.WildcardConsumer/Program.cs +++ b/samples/KafkaFlow.Sample.WildcardConsumer/Program.cs @@ -20,7 +20,7 @@ producerName, _ => { }) .AddConsumer( consumer => consumer - .Topic($"^{topicPrefix}*") // Any topic starting with `random-topic-*` + .Topic($"^{topicPrefix}*") // Any topic starting with `random-topic-*` .WithGroupId("random-topic-handler") .WithBufferSize(5) .WithWorkersCount(3) @@ -67,4 +67,4 @@ await producer.ProduceAsync( Guid.NewGuid().ToString(), Encoding.UTF8.GetBytes( $"Message to {input}: {Guid.NewGuid()}")); -} \ No newline at end of file +} diff --git a/samples/KafkaFlow.Sample/KafkaFlow.Sample.csproj b/samples/KafkaFlow.Sample/KafkaFlow.Sample.csproj index 89cfb73ca..0b5671655 100644 --- a/samples/KafkaFlow.Sample/KafkaFlow.Sample.csproj +++ b/samples/KafkaFlow.Sample/KafkaFlow.Sample.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 false false true @@ -24,7 +24,7 @@ - + diff --git a/src/KafkaFlow.Abstractions/Configuration/SaslOauthbearerMethod.cs b/src/KafkaFlow.Abstractions/Configuration/SaslOauthbearerMethod.cs index 3b4177c05..9b0ee6e37 100644 --- a/src/KafkaFlow.Abstractions/Configuration/SaslOauthbearerMethod.cs +++ b/src/KafkaFlow.Abstractions/Configuration/SaslOauthbearerMethod.cs @@ -1,12 +1,11 @@ -namespace KafkaFlow.Configuration +namespace KafkaFlow.Configuration; + +/// SaslOauthbearerMethod enum values +public enum SaslOauthbearerMethod { - /// SaslOauthbearerMethod enum values - public enum SaslOauthbearerMethod - { - /// Default - Default, + /// Default + Default, - /// Oidc - Oidc, - } + /// Oidc + Oidc, } diff --git a/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj b/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj index 283ef9c6b..d38abd045 100644 --- a/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj +++ b/src/KafkaFlow.Abstractions/KafkaFlow.Abstractions.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj b/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj index ae071e278..06fc64b9c 100644 --- a/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj +++ b/src/KafkaFlow.Admin.Dashboard/KafkaFlow.Admin.Dashboard.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true Latest true @@ -23,7 +23,7 @@ - + diff --git a/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj b/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj index 44b6cf74e..4d08303a1 100644 --- a/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj +++ b/src/KafkaFlow.Admin.WebApi/KafkaFlow.Admin.WebApi.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 Library KafkaFlow.Admin.WebApi Allows KafkaFlow to use the Admin Web API diff --git a/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj b/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj index 69586386a..ba02e372e 100644 --- a/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj +++ b/src/KafkaFlow.Compressor.Gzip/KafkaFlow.Compressor.Gzip.csproj @@ -9,4 +9,5 @@ + \ No newline at end of file diff --git a/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj b/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj index 0533b40c3..f8fb7a721 100644 --- a/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj +++ b/src/KafkaFlow.Extensions.Hosting/KafkaFlow.Extensions.Hosting.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj b/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj index 44287854f..66b3831e9 100644 --- a/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj +++ b/src/KafkaFlow.LogHandler.Console/KafkaFlow.LogHandler.Console.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj b/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj index a2ef2b168..e85ba513d 100644 --- a/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj +++ b/src/KafkaFlow.LogHandler.Microsoft/KafkaFlow.LogHandler.Microsoft.csproj @@ -12,8 +12,8 @@ - - + + diff --git a/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj b/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj index ebd8ab6a0..314d4ccdd 100644 --- a/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj +++ b/src/KafkaFlow.Microsoft.DependencyInjection/KafkaFlow.Microsoft.DependencyInjection.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/KafkaFlow.OpenTelemetry/ActivitySourceAccessor.cs b/src/KafkaFlow.OpenTelemetry/ActivitySourceAccessor.cs index 5a119dbbf..8fb371ce3 100644 --- a/src/KafkaFlow.OpenTelemetry/ActivitySourceAccessor.cs +++ b/src/KafkaFlow.OpenTelemetry/ActivitySourceAccessor.cs @@ -1,9 +1,6 @@ -extern alias SemanticConventions; - -using System.Collections.Generic; +using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using Conventions = SemanticConventions::OpenTelemetry.Trace.TraceSemanticConventions; namespace KafkaFlow.OpenTelemetry; @@ -19,7 +16,9 @@ internal static class ActivitySourceAccessor internal static void SetGenericTags(Activity activity, IEnumerable bootstrapServers) { - activity?.SetTag(Conventions.AttributeMessagingSystem, MessagingSystemId); - activity?.SetTag(Conventions.AttributePeerService, string.Join(",", bootstrapServers ?? Enumerable.Empty())); + // https://opentelemetry.io/docs/languages/net/libraries/#note-on-versioning + // https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.9.0/src/Shared/SemanticConventions.cs + activity?.SetTag("message.type", MessagingSystemId); + activity?.SetTag("peer.service", string.Join(",", bootstrapServers ?? Enumerable.Empty())); } -} \ No newline at end of file +} diff --git a/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj b/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj index 506126fe9..612e8d3bc 100644 --- a/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj +++ b/src/KafkaFlow.OpenTelemetry/KafkaFlow.OpenTelemetry.csproj @@ -5,10 +5,7 @@ - - - SemanticConventions - + diff --git a/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj b/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj index cc514a288..a1d828116 100644 --- a/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj +++ b/src/KafkaFlow.SchemaRegistry/KafkaFlow.SchemaRegistry.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj b/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj index 252b999e7..430fa4a37 100644 --- a/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj +++ b/src/KafkaFlow.Serializer.JsonCore/KafkaFlow.Serializer.JsonCore.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj b/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj index 67808b7e5..41695639d 100644 --- a/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj +++ b/src/KafkaFlow.Serializer.ProtobufNet/KafkaFlow.Serializer.ProtobufNet.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro.csproj b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro.csproj index c81fed089..4617f478d 100644 --- a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro.csproj +++ b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro/KafkaFlow.Serializer.SchemaRegistry.ConfluentAvro.csproj @@ -13,10 +13,10 @@ - - - - + + + + diff --git a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson.csproj b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson.csproj index 2c3e2619a..44b8ca146 100644 --- a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson.csproj +++ b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson/KafkaFlow.Serializer.SchemaRegistry.ConfluentJson.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf.csproj b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf.csproj index a99bcc155..c36548668 100644 --- a/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf.csproj +++ b/src/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf/KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf.csproj @@ -8,7 +8,7 @@ - + diff --git a/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj b/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj index 63b2a5df4..be63509e1 100644 --- a/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj +++ b/src/KafkaFlow.Unity/KafkaFlow.Unity.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/KafkaFlow/KafkaFlow.csproj b/src/KafkaFlow/KafkaFlow.csproj index bebc9488a..39f3cb217 100644 --- a/src/KafkaFlow/KafkaFlow.csproj +++ b/src/KafkaFlow/KafkaFlow.csproj @@ -7,10 +7,10 @@ - - - - + + + + diff --git a/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj b/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj index 9db78e47b..a057cfbcb 100644 --- a/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj +++ b/tests/KafkaFlow.IntegrationTests/KafkaFlow.IntegrationTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false true @@ -18,19 +18,19 @@ - - - - + + + + true - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/tests/KafkaFlow.UnitTests/Compressors/CompressorConsumerMiddlewareTests.cs b/tests/KafkaFlow.UnitTests/Compressors/CompressorConsumerMiddlewareTests.cs index d1e0d7e62..1aae88f33 100644 --- a/tests/KafkaFlow.UnitTests/Compressors/CompressorConsumerMiddlewareTests.cs +++ b/tests/KafkaFlow.UnitTests/Compressors/CompressorConsumerMiddlewareTests.cs @@ -37,7 +37,7 @@ public void Invoke_NotByteArrayMessage_ThrowsInvalidOperationException() Func act = () => _target.Invoke(_contextMock.Object, _ => this.SetNextCalled()); // Assert - act.Should().Throw(); + act.Should().ThrowAsync(); _nextCalled.Should().BeFalse(); _contextMock.Verify(x => x.SetMessage(It.IsAny(), It.IsAny()), Times.Never); _decompressorMock.Verify(x => x.Decompress(It.IsAny()), Times.Never); diff --git a/tests/KafkaFlow.UnitTests/ConfigurationBuilders/ConsumerConfigurationBuilderTests.cs b/tests/KafkaFlow.UnitTests/ConfigurationBuilders/ConsumerConfigurationBuilderTests.cs index 0164ac2e9..52f49bac2 100644 --- a/tests/KafkaFlow.UnitTests/ConfigurationBuilders/ConsumerConfigurationBuilderTests.cs +++ b/tests/KafkaFlow.UnitTests/ConfigurationBuilders/ConsumerConfigurationBuilderTests.cs @@ -119,7 +119,7 @@ public void Build_AllCalls_ReturnPassedValues() configuration.BufferSize.Should().Be(bufferSize); configuration.WorkersCountCalculator(null, null).Result.Should().Be(workers); configuration.GroupId.Should().Be(groupId); - configuration.GetKafkaConfig().AutoOffsetReset.Should().Be(offsetReset); + configuration.GetKafkaConfig().AutoOffsetReset.Should().HaveSameValueAs(offsetReset); configuration.AutoMessageCompletion.Should().Be(false); configuration.GetKafkaConfig().EnableAutoOffsetStore.Should().Be(false); configuration.GetKafkaConfig().EnableAutoCommit.Should().Be(false); diff --git a/tests/KafkaFlow.UnitTests/KafkaFlow.UnitTests.csproj b/tests/KafkaFlow.UnitTests/KafkaFlow.UnitTests.csproj index 479ec854f..2fa650931 100644 --- a/tests/KafkaFlow.UnitTests/KafkaFlow.UnitTests.csproj +++ b/tests/KafkaFlow.UnitTests/KafkaFlow.UnitTests.csproj @@ -2,7 +2,7 @@ false - net6.0 + net8.0 true @@ -19,17 +19,17 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + + true - + diff --git a/tests/KafkaFlow.UnitTests/Serializers/SerializerConsumerMiddlewareTests.cs b/tests/KafkaFlow.UnitTests/Serializers/SerializerConsumerMiddlewareTests.cs index 4370ec540..98abeb226 100644 --- a/tests/KafkaFlow.UnitTests/Serializers/SerializerConsumerMiddlewareTests.cs +++ b/tests/KafkaFlow.UnitTests/Serializers/SerializerConsumerMiddlewareTests.cs @@ -87,7 +87,7 @@ public void Invoke_NotByteArrayMessage_ThrowsInvalidOperationException() Func act = () => _target.Invoke(_contextMock.Object, _ => this.SetNextCalled()); // Assert - act.Should().Throw(); + act.Should().ThrowAsync(); _nextCalled.Should().BeFalse(); _contextMock.Verify(x => x.SetMessage(It.IsAny(), It.IsAny()), Times.Never); _deserializerMock.Verify( diff --git a/tests/KafkaFlow.UnitTests/TypedHandler/HandlerTypeMappingTests.cs b/tests/KafkaFlow.UnitTests/TypedHandler/HandlerTypeMappingTests.cs index 4a1162d29..b06a586a7 100644 --- a/tests/KafkaFlow.UnitTests/TypedHandler/HandlerTypeMappingTests.cs +++ b/tests/KafkaFlow.UnitTests/TypedHandler/HandlerTypeMappingTests.cs @@ -1,3 +1,5 @@ +using System; +using System.Collections.Generic; using FluentAssertions; using KafkaFlow.Middlewares.TypedHandler; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -26,9 +28,11 @@ public void AddSeveralMappings_GetHandlersTypesReturnsListOfHandlers() // Assert _target.GetHandlersTypes(typeof(int)) .Should() - .BeEquivalentTo( + .BeEquivalentTo(new List + { typeof(string), typeof(double), - typeof(bool)); + typeof(bool) + }); } }