Closed mnorkin closed 5 years ago
New PR, because old one was merged by mistake https://github.com/oleksiyk/kafka/pull/234
https://github.com/oleksiyk/kafka/pull/234#issuecomment-441986061
And can you please revert the ability to run tests locally, without Doker.
@oleksiyk this means what tests will be not isolated from each other and for failed tests will have influence for not failing tests.
and for failed tests will have influence for not failing tests.
Sorry, I'm not sure I understand, what do you mean?
Sorry, I'm not sure I understand, what do you mean?
I can give you an example. Please correct me if I'm wrong.
Test A
and B
is in the same group. Both of each publishes one message.
Test run 1:
Test A
publishes one message to consumer and asserts that consumer handler was called only once. Test passed.
Test B
publishes one message to the consumer and fails.
Test run 2:
Test A
publishes one message to consumer and asserts that consumer handler was called only once. Test failed, because consumer in test A
also received a message from failed test B
.
In dockerized kafka testkit, testkit spins a new instance of kafka every time, so every test run starts from clean offset. Also, docker gives you nice ability to dynamically create topics. Now, every test group creates the topics it needs. No need to create any topics by hand. Which is nice.
Can you please explain why you don't want dockerized kafka? Tests do run locally
, on development machine.
Test run 1: Test A publishes one message to consumer and asserts that consumer handler was called only once. Test passed. Test B publishes one message to the consumer and fails. Test run 2: Test A publishes one message to consumer and asserts that consumer handler was called only once. Test failed, because consumer in test A also received a message from failed test B.
Well I don't see any problem here. Consumers in all such tests are initialised to the end offset of the topic on each startup.
Can you please explain why you don't want dockerized kafka? Tests do run locally, on development machine.
Simple. I don't have enough power to spawn docker/kafka instances for each test. My mbp is already quite busy.
Simple. I don't have enough power to spawn docker/kafka instances for each test. My mbp is already quite busy.
It's for every test run, not for every test.
Anyway. Thats my average runtime with current project, docker doesn't fit here:
Also, this change is not within PR topic.
Ok, I'm closing this, bye
Implement high performant metadata read from kafka cluster.
Previous implementation looped over all the topics, which it received from kafka cluster. Current implementation fetches only metadata by topic, so no loop over all topics is required.
npm run test