Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public static void main(final String[] args) throws Exception {
final StreamsBuilder builder = new StreamsBuilder();

final KStream<String, String> sourceStream = builder.stream(inputTopic, Consumed.with(Serdes.String(), Serdes.String()));
sourceStream.peek((k, v) -> System.out.println(String.format("input data key=%s, value=%s", k, v)));

final KStream<String, String> mappedStream = sourceStream.selectKey((k, v) -> keyFunction.apply(v));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, test_context):
}

self.zookeeper = ZookeeperService(self.test_context, num_nodes=1)
self.kafka = KafkaService(self.test_context, num_nodes=1,
self.kafka = KafkaService(self.test_context, num_nodes=3,

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.

Changed this value to be consistent with other system tests

zk=self.zookeeper, topics=self.topics)

self.producer = VerifiableProducer(self.test_context,
Expand All @@ -66,7 +66,6 @@ def test_upgrade_topology_with_named_repartition_topic(self):
for processor in processors:
processor.CLEAN_NODE_ENABLED = False
self.set_topics(processor)
processor.start()

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.

This is the fix removed start here and below

self.verify_running(processor, 'REBALANCING -> RUNNING')

self.verify_processing(processors)
Expand All @@ -76,7 +75,6 @@ def test_upgrade_topology_with_named_repartition_topic(self):
self.verify_stopped(processor)
# will tell app to add operations before repartition topic
processor.ADD_ADDITIONAL_OPS = 'true'
processor.start()
self.verify_running(processor, 'UPDATED Topology')

self.verify_processing(processors)
Expand All @@ -89,7 +87,9 @@ def test_upgrade_topology_with_named_repartition_topic(self):

@staticmethod
def verify_running(processor, message):
with processor.node.account.monitor_log(processor.STDOUT_FILE) as monitor:
node = processor.node
with node.account.monitor_log(processor.STDOUT_FILE) as monitor:
processor.start()

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.

This is the other part of the fix moved processor start here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the significance of after opening the monitor? Does it block on the log file somehow?

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.

This closes a very small timing window, I've made similar changes in other system tests before

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.

@vvcephei If get don't get the monitor first, we might miss some output lines from the file in wait_until below and thus time out even if the correct output was written.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

monitor.wait_until(message,
timeout_sec=60,
err_msg="Never saw '%s' message " % message + str(processor.node.account))
Expand Down