Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/kafkatest/services/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,15 @@ def __init__(self, test_context, kafka, processingMode):
"org.apache.kafka.streams.tests.BrokerCompatibilityTest",
processingMode)

def prop_file(self):
properties = {streams_property.STATE_DIR: self.PERSISTENT_ROOT,
streams_property.KAFKA_SERVERS: self.kafka.bootstrap_servers(),
# the old broker (< 2.4) does not support configuration replication.factor=-1
"replication.factor": 1}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we set it to 3 instead? IIRC, we run all system tests with 3 brokers? Wondering why the change broke the system tests, as they should have overwritten the default to 3 anyway?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds like we don't override the default after all? Or we have at least one test where that slipped through 🤷‍♀️

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess the logic scattered between Python and Java code... And maybe we need 3 only for EOS tests? Not sure either.

Also ok with me to just merge this PR as-is? Or should we update Java code instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, yeah, I bet that's it: we only set it for the EOS tests. Might be better to just set it in the Java code instead as it's easier to find and read, and I believe most other configs are set there. I think this test runs the StreamsSmokeTest?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Should we set it to 3 instead? IIRC, we run all system tests with 3 brokers?

not really. streams_broker_compatibility_test.py run test with single broker ( https://github.com/apache/kafka/blob/trunk/tests/kafkatest/tests/streams/streams_broker_compatibility_test.py#L45)

Might be better to just set it in the Java code instead as it's easier to find and read, and I believe most other configs are set there.

I prefer to change python code rather than java code since the number of brokers is connected to replication refactor. If we add hardcode (i.e replication refactor = 1) in the java class, it is hard to change both of them in python.

I think this test runs the StreamsSmokeTest?

BrokerCompatibilityTest (https://github.com/apache/kafka/blob/trunk/tests/kafkatest/services/streams.py#L466)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine with me either way. Thanks for the fix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine with me, too. Feel free to merge.


cfg = KafkaConfig(**properties)
return cfg.render()


class StreamsBrokerDownResilienceService(StreamsTestBaseService):
def __init__(self, test_context, kafka, configs):
Expand Down