Browse Source

MINOR: Fix typos in build.gradle, tests and trogdor (#14574)

Reviewers: Mickael Maison <mickael.maison@gmail.com>, hudeqi <1217150961@qq.com>
pull/14531/merge
shuoer86 1 year ago committed by GitHub
parent
commit
27a155c80a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      build.gradle
  2. 4
      tests/kafkatest/services/verifiable_client.py
  3. 4
      tests/kafkatest/tests/client/quota_test.py
  4. 2
      tests/kafkatest/tests/streams/streams_broker_compatibility_test.py
  5. 4
      trogdor/src/test/java/org/apache/kafka/trogdor/rest/RestExceptionMapperTest.java

2
build.gradle

@ -774,7 +774,7 @@ def fineTuneEclipseClasspathFile(eclipse, project) {
} }
/* /*
* Set all eclipse build output to go to 'build_eclipse' directory. This is to ensure that gradle and eclipse use different * Set all eclipse build output to go to 'build_eclipse' directory. This is to ensure that gradle and eclipse use different
* build output directories, and also avoid using the eclpise default of 'bin' which clashes with some of our script directories. * build output directories, and also avoid using the eclipse default of 'bin' which clashes with some of our script directories.
* https://discuss.gradle.org/t/eclipse-generated-files-should-be-put-in-the-same-place-as-the-gradle-generated-files/6986/2 * https://discuss.gradle.org/t/eclipse-generated-files-should-be-put-in-the-same-place-as-the-gradle-generated-files/6986/2
*/ */
cp.entries.findAll { it.kind == "output" }*.path = "build_eclipse" cp.entries.findAll { it.kind == "output" }*.path = "build_eclipse"

4
tests/kafkatest/services/verifiable_client.py

@ -60,8 +60,8 @@ Common requirements for both:
* Log/debug to stderr * Log/debug to stderr
Common communication for both: Common communication for both:
* `{ "name": "startup_complete" }` - Client succesfully started * `{ "name": "startup_complete" }` - Client successfully started
* `{ "name": "shutdown_complete" }` - Client succesfully terminated (after receiving SIGINT/SIGTERM) * `{ "name": "shutdown_complete" }` - Client successfully terminated (after receiving SIGINT/SIGTERM)
================== ==================

4
tests/kafkatest/tests/client/quota_test.py

@ -77,10 +77,10 @@ class QuotaConfig(object):
self.configure_quota(kafka, QuotaConfig.LARGE_QUOTA, QuotaConfig.LARGE_QUOTA, ['clients', None]) self.configure_quota(kafka, QuotaConfig.LARGE_QUOTA, QuotaConfig.LARGE_QUOTA, ['clients', None])
def configure_quota(self, kafka, producer_byte_rate, consumer_byte_rate, entity_args): def configure_quota(self, kafka, producer_byte_rate, consumer_byte_rate, entity_args):
force_use_zk_conection = not kafka.all_nodes_configs_command_uses_bootstrap_server() force_use_zk_connection = not kafka.all_nodes_configs_command_uses_bootstrap_server()
node = kafka.nodes[0] node = kafka.nodes[0]
cmd = "%s --alter --add-config producer_byte_rate=%d,consumer_byte_rate=%d" % \ cmd = "%s --alter --add-config producer_byte_rate=%d,consumer_byte_rate=%d" % \
(kafka.kafka_configs_cmd_with_optional_security_settings(node, force_use_zk_conection), producer_byte_rate, consumer_byte_rate) (kafka.kafka_configs_cmd_with_optional_security_settings(node, force_use_zk_connection), producer_byte_rate, consumer_byte_rate)
cmd += " --entity-type " + entity_args[0] + self.entity_name_opt(entity_args[1]) cmd += " --entity-type " + entity_args[0] + self.entity_name_opt(entity_args[1])
if len(entity_args) > 2: if len(entity_args) > 2:
cmd += " --entity-type " + entity_args[2] + self.entity_name_opt(entity_args[3]) cmd += " --entity-type " + entity_args[2] + self.entity_name_opt(entity_args[3])

2
tests/kafkatest/tests/streams/streams_broker_compatibility_test.py

@ -195,7 +195,7 @@ class StreamsBrokerCompatibility(Test):
processor.start() processor.start()
log.wait_until('Shutting down because the Kafka cluster seems to be on a too old version. Setting processing\.guarantee="exactly_once_v2"/"exactly_once_beta" requires broker version 2\.5 or higher\.', log.wait_until('Shutting down because the Kafka cluster seems to be on a too old version. Setting processing\.guarantee="exactly_once_v2"/"exactly_once_beta" requires broker version 2\.5 or higher\.',
timeout_sec=60, timeout_sec=60,
err_msg="Never saw 'Shutting down because the Kafka cluster seems to be on a too old version. Setting `processing.guarantee=\"exactly_once_v2\"/\"exaclty_once_beta\"` requires broker version 2.5 or higher.' log message " + str(processor.node.account)) err_msg="Never saw 'Shutting down because the Kafka cluster seems to be on a too old version. Setting `processing.guarantee=\"exactly_once_v2\"/\"exactly_once_beta\"` requires broker version 2.5 or higher.' log message " + str(processor.node.account))
monitor.wait_until('FATAL: An unexpected exception org.apache.kafka.common.errors.UnsupportedVersionException', monitor.wait_until('FATAL: An unexpected exception org.apache.kafka.common.errors.UnsupportedVersionException',
timeout_sec=60, timeout_sec=60,
err_msg="Never saw 'FATAL: An unexpected exception org.apache.kafka.common.errors.UnsupportedVersionException' error message " + str(processor.node.account)) err_msg="Never saw 'FATAL: An unexpected exception org.apache.kafka.common.errors.UnsupportedVersionException' error message " + str(processor.node.account))

4
trogdor/src/test/java/org/apache/kafka/trogdor/rest/RestExceptionMapperTest.java

@ -80,7 +80,7 @@ public class RestExceptionMapperTest {
@Test @Test
public void testToResponseUnknownException() { public void testToResponseUnknownException() {
RestExceptionMapper mapper = new RestExceptionMapper(); RestExceptionMapper mapper = new RestExceptionMapper();
Response resp = mapper.toResponse(new Exception("Unkown exception")); Response resp = mapper.toResponse(new Exception("Unknown exception"));
assertEquals(resp.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()); assertEquals(resp.getStatus(), Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());
} }
@ -104,6 +104,6 @@ public class RestExceptionMapperTest {
@Test @Test
public void testToExceptionRuntimeException() { public void testToExceptionRuntimeException() {
assertThrows(RuntimeException.class, () -> RestExceptionMapper.toException(-1, "Unkown status code")); assertThrows(RuntimeException.class, () -> RestExceptionMapper.toException(-1, "Unknown status code"));
} }
} }

Loading…
Cancel
Save