Fix bug in json naming (#18858)

Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Andrew Schofield <aschofield@confluent.io>
This commit is contained in:
ShivsundarR 2025-02-11 09:53:54 -05:00 committed by GitHub
parent 84b639d932
commit 210f277910
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -98,7 +98,7 @@ public final class ShareConsumeBenchSpec extends TaskSpec {
@JsonProperty("bootstrapServers") String bootstrapServers, @JsonProperty("bootstrapServers") String bootstrapServers,
@JsonProperty("targetMessagesPerSec") int targetMessagesPerSec, @JsonProperty("targetMessagesPerSec") int targetMessagesPerSec,
@JsonProperty("maxMessages") long maxMessages, @JsonProperty("maxMessages") long maxMessages,
@JsonProperty("consumerGroup") String shareGroup, @JsonProperty("shareGroup") String shareGroup,
@JsonProperty("consumerConf") Map<String, String> consumerConf, @JsonProperty("consumerConf") Map<String, String> consumerConf,
@JsonProperty("commonClientConf") Map<String, String> commonClientConf, @JsonProperty("commonClientConf") Map<String, String> commonClientConf,
@JsonProperty("adminClientConf") Map<String, String> adminClientConf, @JsonProperty("adminClientConf") Map<String, String> adminClientConf,

View File

@ -50,6 +50,14 @@ class ShareConsumeBenchSpecTest {
} }
} }
@Test
public void testDefaultShareGroupName() {
ShareConsumeBenchSpec shareConsumeBenchSpec = new ShareConsumeBenchSpec(0, 0, "node", "localhost",
123, 1234, null, Collections.emptyMap(), Collections.emptyMap(), Collections.emptyMap(), 1,
Optional.empty(), List.of("abc"));
assertEquals("share", shareConsumeBenchSpec.shareGroup());
}
private ShareConsumeBenchSpec shareConsumeBenchSpec(List<String> activeTopics) { private ShareConsumeBenchSpec shareConsumeBenchSpec(List<String> activeTopics) {
return new ShareConsumeBenchSpec(0, 0, "node", "localhost", return new ShareConsumeBenchSpec(0, 0, "node", "localhost",
123, 1234, "sg-1", 123, 1234, "sg-1",