Skip to content

Commit

Permalink
fix schema.registry.url (#399)
Browse files Browse the repository at this point in the history
* fix schema.registry.url

* fix pom

* fixpom-maven-central

* 395 Fix Codacy complains

* 395 Fix Codacy complains

* 395 Fix Codacy complains

---------

Co-authored-by: Jose E. Garcia Maciñeiras <[email protected]>
Co-authored-by: Jose Enrique García Maciñeiras <[email protected]>
  • Loading branch information
3 people authored Sep 15, 2023
1 parent fea241e commit 36437de
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
13 changes: 12 additions & 1 deletion pom-maven-central.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<artifactId>kloadgen</artifactId>

<version>5.6.5</version>
<version>5.6.6</version>

<name>KLoadGen</name>
<description>Load Generation Jmeter plugin for Kafka Cluster. Supporting AVRO, JSON Schema and Protobuf schema types. Generate Artificial
Expand Down Expand Up @@ -279,6 +279,17 @@
</roles>
<timezone>Europe/Madrid</timezone>
</developer>
<developer>
<id>enrique.gonzalo</id>
<name>Enrique Gonzalo Legarra</name>
<email>[email protected]</email>
<organization>Sngular</organization>
<organizationUrl>https://sngular.github.io/</organizationUrl>
<roles>
<role>Senior FullStack Developer</role>
</roles>
<timezone>Europe/Madrid</timezone>
</developer>
</developers>

<scm>
Expand Down
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<artifactId>kloadgen</artifactId>

<version>5.6.5</version>
<version>5.6.6</version>

<name>KLoadGen</name>
<description>Load Generation Jmeter plugin for Kafka Cluster. Supporting AVRO, JSON Schema and Protobuf schema types. Generate Artificial
Expand Down Expand Up @@ -268,6 +268,17 @@
</roles>
<timezone>Europe/Madrid</timezone>
</developer>
<developer>
<id>enrique.gonzalo</id>
<name>Enrique Gonzalo Legarra</name>
<email>[email protected]</email>
<organization>Sngular</organization>
<organizationUrl>https://sngular.github.io/</organizationUrl>
<roles>
<role>Senior FullStack Developer</role>
</roles>
<timezone>Europe/Madrid</timezone>
</developer>
</developers>

<scm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void serializeProperties() {

JMeterContextService.getContext().getProperties().setProperty(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_NAME, getRegistryName());
jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_NAME, JMeterHelper.checkPropertyOrVariable(getRegistryName()));

jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL, JMeterHelper.checkPropertyOrVariable(getSchemaRegistryUrl()));
jMeterVariables.put(schemaRegistryManager.getSchemaRegistryUrlKey(), JMeterHelper.checkPropertyOrVariable(getRegistryUrl()));
if (ProducerKeysHelper.FLAG_YES.equalsIgnoreCase(schemaProperties.get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_FLAG))) {
jMeterVariables.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_AUTH_FLAG, ProducerKeysHelper.FLAG_YES);
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/sngular/kloadgen/sampler/SamplerUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ public static Properties setupCommonConsumerProperties(final JavaSamplerContext
if (Objects.nonNull(context.getJMeterVariables().get(PropsKeysHelper.KEY_SCHEMA))) {
props.put(PropsKeysHelper.KEY_SCHEMA, context.getJMeterVariables().get(PropsKeysHelper.KEY_SCHEMA));
}
if (Objects.nonNull(context.getJMeterVariables().get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL))) {
props.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL, context.getJMeterVariables().get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL));
}

props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, context.getParameter(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG));
props.put(PropsKeysHelper.TIMEOUT_MILLIS, context.getParameter(PropsKeysHelper.TIMEOUT_MILLIS));
Expand Down

0 comments on commit 36437de

Please sign in to comment.