LGouellec / kafka-streams-dotnet

.NET Stream Processing Library for Apache Kafka 🚀
https://lgouellec.github.io/kafka-streams-dotnet/
MIT License
455 stars 74 forks source link

TopologyTestDriver doesn't work with Confluent.Kafka 1.9.2 #167

Closed alexander-bobrov closed 1 year ago

alexander-bobrov commented 1 year ago

Streamiz.Kafka.Net nuget version: 1.3.1 and 1.3.0 OS Windows 10 Enterprise net6.0

Code snippet below used to work, but now it throws an exception on TopologyTestDriver creation:

System.TypeLoadException
  HResult=0x80131522
  Message=Method 'DeleteGroupsAsync' in type 'Streamiz.Kafka.Net.Mock.Sync.SyncAdminClient' from assembly 'Streamiz.Kafka.Net, Version=1.3.1.0, Culture=neutral, PublicKeyToken=75e24dc15437bbc5' does not have an implementation.
  Source=<Cannot evaluate the exception source>
  StackTrace:
<Cannot evaluate the exception stack trace>

  This exception was originally thrown at this call stack:
    [External Code]
    Skai.TerminalGateway.Adapter.Tests.Tests.Test1() in MappingTest.cs
        [Test]
        public void Test1()
        {
            var config = new StreamConfig<StringSerDes, StringSerDes>();
            config.ApplicationId = "test-test-driver-app";

            StreamBuilder builder = new StreamBuilder();

            builder.Stream<string, string>("test")
                    .Filter((k, v) => v.Contains("test"))
                    .To("test-output");

            var t = builder.Build();
            var driver = new TopologyTestDriver(t, config);
        }
alexander-bobrov commented 1 year ago

Found the issue: Confluent.Kafka package has been updated to 1.9.2 and it breaks the driver

Solution: Downgrade Confluent.Kafka to 1.9.0

LGouellec commented 1 year ago

Fix done, available the next release 1.3.0