masesgroup / KEFCore

Entity Framework Core provider for Apache Kafka

Home Page:https://kefcore.masesgroup.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using only Kafka stored data the tests fails

mariomastrodicasa opened this issue · comments

Describe the bug
If the test application does not recreate the Kafka topics the tests fails with Sequence contains no elements

To Reproduce
Steps to reproduce the behavior:

  1. Create a JSON configuration file named KNetReplicatorNoLoadTest.json with the following content:
{
  "UseCompactedReplicator": true,
  "DeleteApplicationData": false,
  "LoadApplicationData": false,
  "BootstrapServers": "KAFKA_CLUSTER:9092"
}
  1. Execute MASES.EntityFrameworkCore.KNet.Test.exe .\KNetReplicatorNoLoadTest.json
  2. See error

Expected behavior
The test shall be executed without error retrieving previously data stored

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: 0.8.0

Additional context
Attached the changed files in the test projects KEFCore.Test.zip

Seems the problem is in this line of code

_kafkaCompactedReplicator.StartAndWait();

The code does not wait the synchronization of local data with associated topic.