Skip to content

Seeking to end#422

Open
Alopalao wants to merge 2 commits intomasterfrom
test/kafka_flaky
Open

Seeking to end#422
Alopalao wants to merge 2 commits intomasterfrom
test/kafka_flaky

Conversation

@Alopalao
Copy link

@Alopalao Alopalao commented Feb 27, 2026

Related #394

Summary

After doing more tests, the earliest option was capturing lots of logs from previous tests and slowing the the capturing of the evc created log for the Kafka test. So it has been removed.
Instead seek_to_end() is now executing to make sure assignments are ready. By default it is going to wait 40 seconds.

Local Tests

End-to-End Tests

I run them but decided to run them again without copying the results. Gonna post the result once all the 301 tests results are ready.

@Alopalao Alopalao requested a review from a team as a code owner February 27, 2026 22:04
found = False

for _ in range(4):
for _ in range(5):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alopalao, another point to explore here to improve the test is to debug check if the timeout_ms=2000 on consumer.getmany(timeout_ms=2000) is being sufficient enough when polling for records, like per iteration are we getting at least 30 records here? We should also consider passing the max_records=5000 to getmany too.

What I think it might be happening here is, if timeout_ms might be too low, or if in a stationary situation it's producing too many records say 50 records / sec, and then 'kytos/mef_eline.created' never gets found, because even if we forward the customer to the end of the stream other periodic events from other NApps on this topology will still be published. Locally, on a ring topology I've observed around 40 records / sec.

Also, on this test case since it's finding a needle in a haystack and other records will still be sent to the same topic, maybe it'll also need more iterations, you bumped here to 5, but maybe we should also consider 20 or something even higher.

Wdyt @Alopalao?

Side note: as kafka_events evolve one day we should also consider mapping which events pattern should be sent to which topic, that could help with less interference from other events for this type of test, and then say sending mef_eline events to its exclusive topic, this isn't final point here isn't worth pursing for now but as we evolve the NApp and review its blueprint let's keep it in mind for testability, otherwise every finding needle in a haystack will be very difficult to get right as far as being more deterministic and not taking too long to run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants