Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

332 comsngularkloadgenserializerprotobufserializer nullpointerexception #430

Conversation

jemacineiras
Copy link
Contributor

No description provided.

AdrianLagartera and others added 30 commits February 22, 2023 13:45
Added a trim statement to avoid problem when cast the schemas from classpath
Removed some unused test files
Apparently the original project was renamed into cmak to avoid break the TOS of kafka having the kafka in the name of unofficial tool
…genserializerprotobufserializer-nullpointerexception

# Conflicts:
#	pom.xml
#	src/main/java/com/sngular/kloadgen/sampler/SamplerUtil.java
#	src/test/resources/mappings/schema_registry_stub.json
…pointerexception' of github.com:sngular/kloadgen into 332-comsngularkloadgenserializerprotobufserializer-nullpointerexception
…rializer-nullpointerexception

# Conflicts:
#	pom.xml
#	src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementBeanInfo.java
#	src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java
#	src/main/java/com/sngular/kloadgen/extractor/extractors/avro/AvroExtractor.java
#	src/main/java/com/sngular/kloadgen/sampler/KafkaProducerSampler.java
#	src/test/java/com/sngular/kloadgen/sampler/SamplerUtilTest.java
@jemacineiras jemacineiras added bug Something isn't working release Adding this tag to a PR will cause a release on merge labels Jan 8, 2024
@jemacineiras jemacineiras self-assigned this Jan 8, 2024
Copy link

github-actions bot commented Jan 8, 2024

Project version has not been updated in pom.xml. Please, update your version using https://semver.org specifications.

1 similar comment
Copy link

github-actions bot commented Jan 8, 2024

Project version has not been updated in pom.xml. Please, update your version using https://semver.org specifications.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be a good idea to delete all this commented out code? If it is necessary in the future we could just get it from version control.

Comment on lines +217 to +223
if (Objects.nonNull(context.getJMeterVariables().get(PropsKeysHelper.KEY_DESERIALIZER_CLASS_PROPERTY))) {
props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, context.getJMeterVariables().get(PropsKeysHelper.KEY_DESERIALIZER_CLASS_PROPERTY));
} else {
props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, "org.apache.kafka.common.serialization.StringDeserializer");
}
if (Objects.nonNull(JavaSamplerContext.getJMeterVariables().get(PropsKeysHelper.VALUE_DESERIALIZER_CLASS_PROPERTY))) {
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, JavaSamplerContext.getJMeterVariables().get(PropsKeysHelper.VALUE_DESERIALIZER_CLASS_PROPERTY));
if (Objects.nonNull(context.getJMeterVariables().get(PropsKeysHelper.VALUE_DESERIALIZER_CLASS_PROPERTY))) {
props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, context.getJMeterVariables().get(PropsKeysHelper.VALUE_DESERIALIZER_CLASS_PROPERTY));
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe its a good idea to add a vars variable holding the content of context.getJMeterVariables() as we do in other methods in order to reduce the number of times we repeat this expression.

Comment on lines +233 to +237
if (Objects.nonNull(context.getJMeterVariables().get(ProducerKeysHelper.VALUE_NAME_STRATEGY))) {
props.put(ProducerKeysHelper.VALUE_NAME_STRATEGY, context.getJMeterVariables().get(ProducerKeysHelper.VALUE_NAME_STRATEGY));
}
if (Objects.nonNull(JavaSamplerContext.getJMeterVariables().get(ProducerKeysHelper.KEY_NAME_STRATEGY))) {
props.put(ProducerKeysHelper.KEY_NAME_STRATEGY, JavaSamplerContext.getJMeterVariables().get(ProducerKeysHelper.KEY_NAME_STRATEGY));
if (Objects.nonNull(context.getJMeterVariables().get(ProducerKeysHelper.KEY_NAME_STRATEGY))) {
props.put(ProducerKeysHelper.KEY_NAME_STRATEGY, context.getJMeterVariables().get(ProducerKeysHelper.KEY_NAME_STRATEGY));
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing as the comment before

Comment on lines -273 to +286
if (Objects.nonNull(JavaSamplerContext.getJMeterVariables().get(PropsKeysHelper.VALUE_SCHEMA))) {
props.put(PropsKeysHelper.VALUE_SCHEMA, JavaSamplerContext.getJMeterVariables().get(PropsKeysHelper.VALUE_SCHEMA));
if (Objects.nonNull(context.getJMeterVariables().get(PropsKeysHelper.VALUE_SCHEMA))) {
props.put(PropsKeysHelper.VALUE_SCHEMA, context.getJMeterVariables().get(PropsKeysHelper.VALUE_SCHEMA));
}
if (Objects.nonNull(JavaSamplerContext.getJMeterVariables().get(PropsKeysHelper.KEY_SCHEMA))) {
props.put(PropsKeysHelper.KEY_SCHEMA, JavaSamplerContext.getJMeterVariables().get(PropsKeysHelper.KEY_SCHEMA));
if (Objects.nonNull(context.getJMeterVariables().get(PropsKeysHelper.KEY_SCHEMA))) {
props.put(PropsKeysHelper.KEY_SCHEMA, context.getJMeterVariables().get(PropsKeysHelper.KEY_SCHEMA));
}
if (Objects.nonNull(JavaSamplerContext.getJMeterVariables().get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL))) {
props.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL, JavaSamplerContext.getJMeterVariables().get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL));
if (Objects.nonNull(context.getJMeterVariables().get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL))) {
props.put(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL, context.getJMeterVariables().get(SchemaRegistryKeyHelper.SCHEMA_REGISTRY_URL));
Copy link
Contributor

Choose a reason for hiding this comment

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

Same thing as the comment before

@davidgayoso davidgayoso merged commit 4540f78 into master May 3, 2024
7 checks passed
@janDuinRod janDuinRod deleted the 332-comsngularkloadgenserializerprotobufserializer-nullpointerexception branch May 3, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release Adding this tag to a PR will cause a release on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants