mumrah commented on code in PR #17019:
URL: https://github.com/apache/kafka/pull/17019#discussion_r1734975803
##########
core/src/test/java/kafka/test/junit/ClusterTestExtensions.java:
##########
@@ -241,6 +241,26 @@ private List<TestTemplateInvocationContext>
processClusterTestInternal(Extension
.collect(Collectors.toList());
}
+ private List<TestTemplateInvocationContext> repeatTestContexts(
+ List<TestTemplateInvocationContext> contexts
+ ) {
+ int count;
+ try {
+ String repeatCount =
System.getProperty("kafka.cluster.test.repeat", "1");
+ count = Integer.parseInt(repeatCount);
+ } catch (NumberFormatException e) {
+ count = 1;
+ }
+ if (count <= 1) {
+ return contexts;
+ }
+ List<TestTemplateInvocationContext> repeatedContexts = new
ArrayList<>(contexts.size() * count);
+ for (int i = 0; i < count; i++) {
+ repeatedContexts.addAll(contexts);
Review Comment:
This is a good point. I'll modify the annotation processing to create unique
instances of the invocation contexts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]