kirktrue commented on PR #19041: URL: https://github.com/apache/kafka/pull/19041#issuecomment-2814264150
@EsMoX— Sorry for the confusion, but the proposed change isn't technically correct. The contents of the string doesn't change the test in any functional way. It's used verbatim in the test results to provide a little more information if the test fails at that particular point. In the case of this test, it intentionally attempts to create an invalid `ProducerConfig` by supplying the invalid value 6 as a maximum inflight request/connection value. The value of `5` is [hard-coded](https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java#L262-L264) as the maximum allowable number of inflight requests when using an idempotent producer, and it's [checked](https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java#L596-L599) during `ProducerConfig` creation. So providing a value of `6` _should_ cause an error to be thrown. That's what this part of the test is ensuring. So if we want to change anything, we might consider changing the informational message for the assert so that it's more helpful should that value ever change. For example, it could look something like this: ```java Properties invalidProps4 = new Properties() {{ putAll(baseProps); setProperty(ProducerConfig.MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION, "6"); setProperty(ProducerConfig.TRANSACTIONAL_ID_CONFIG, "transactionalId"); }}; assertThrows( ConfigException.class, () -> new ProducerConfig(invalidProps4), "A ConfigException should have been thrown when setting max.in.flight.requests.per.connection to 6 for an idempotent producer"); ``` -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org