Skip to content

Commit

Permalink
Intellij and maven formatter disagree
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Barker <sbarker@redhat.com>
  • Loading branch information
SamBarker committed Jul 31, 2023
1 parent de15b44 commit e57234a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void exposesTwoSeparateUpstreamClustersUsingSniRouting(KafkaCluster cluster) thr
var virtualCluster = new VirtualClusterBuilder(base)
.withClusterNetworkAddressConfigProvider(
new ClusterNetworkAddressConfigProviderDefinitionBuilder("SniRouting").withConfig("bootstrapAddress", virtualClusterFQDN + ":9192",
"brokerAddressPattern", virtualClusterBrokerAddressPattern.formatted(i))
"brokerAddressPattern", virtualClusterBrokerAddressPattern.formatted(i))
.build())
.withNewTls()
.withNewKeyStoreKey()
Expand Down Expand Up @@ -294,7 +294,7 @@ void connectToExposedBrokerEndpointsDirectlyAfterKroxyliciousRestart_Sasl(String
clientSecurityProtocolConfig.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol.name);
clientSecurityProtocolConfig.put(SaslConfigs.SASL_JAAS_CONFIG,
String.format("""
%s required username="%s" password="%s";""",
%s required username="%s" password="%s";""",
PlainLoginModule.class.getName(), SASL_USER, SASL_PASSWORD));
clientSecurityProtocolConfig.put(SaslConfigs.SASL_MECHANISM, "PLAIN");

Expand Down Expand Up @@ -483,8 +483,8 @@ private void verifyAllBrokersAvailableViaProxy(KroxyliciousTester tester, KafkaC
await().atMost(Duration.ofSeconds(10))
.ignoreExceptions()
.until(() -> admin.describeTopics(List.of(topic)).topicNameValues().get(topic).get()
.partitions().stream().map(TopicPartitionInfo::leader)
.collect(Collectors.toSet()),
.partitions().stream().map(TopicPartitionInfo::leader)
.collect(Collectors.toSet()),
leaders -> leaders.size() == numberOfPartitions);

for (int partition = 0; partition < numberOfPartitions; partition++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class ConfigurationTest {

public static Stream<Arguments> yamlDeserializeSerializeFidelity() {
return Stream.of(Arguments.of("Top level flags", """
useIoUring: true
"""),
useIoUring: true
"""),
Arguments.of("Virtual cluster (PortPerBroker)", """
virtualClusters:
demo1:
Expand Down Expand Up @@ -119,9 +119,9 @@ void yamlDeserializeSerializeFidelity(String name, String config) throws Excepti

public static Stream<Arguments> fluentApiConfigYamlFidelity() {
return Stream.of(Arguments.of("Top level",
new ConfigurationBuilder().withUseIoUring(true).build(),
"""
useIoUring: true"""),
new ConfigurationBuilder().withUseIoUring(true).build(),
"""
useIoUring: true"""),

Arguments.of("With filter",
new ConfigurationBuilder()
Expand Down Expand Up @@ -326,30 +326,30 @@ void shouldConfigureClusterNameFromNodeName() {
void shouldDetectDuplicateClusterNodeNames() {
// Given
assertThatThrownBy(() ->
// When
configParser.parseConfiguration("""
virtualClusters:
demo1:
targetCluster:
bootstrap_servers: kafka.example:1234
clusterNetworkAddressConfigProvider:
type: PortPerBroker
config:
bootstrapAddress: cluster1:9192
numberOfBrokerPorts: 1
brokerAddressPattern: localhost
brokerStartPort: 9193
demo1:
targetCluster:
bootstrap_servers: magic-kafka.example:1234
clusterNetworkAddressConfigProvider:
type: PortPerBroker
config:
bootstrapAddress: cluster2:9193
numberOfBrokerPorts: 1
brokerAddressPattern: localhost
brokerStartPort: 10193
"""))
// When
configParser.parseConfiguration("""
virtualClusters:
demo1:
targetCluster:
bootstrap_servers: kafka.example:1234
clusterNetworkAddressConfigProvider:
type: PortPerBroker
config:
bootstrapAddress: cluster1:9192
numberOfBrokerPorts: 1
brokerAddressPattern: localhost
brokerStartPort: 9193
demo1:
targetCluster:
bootstrap_servers: magic-kafka.example:1234
clusterNetworkAddressConfigProvider:
type: PortPerBroker
config:
bootstrapAddress: cluster2:9193
numberOfBrokerPorts: 1
brokerAddressPattern: localhost
brokerStartPort: 10193
"""))
// Then
.isInstanceOf(IllegalArgumentException.class)
.hasCauseInstanceOf(JsonMappingException.class) // Debatable to enforce the wrapped JsonMappingException
Expand Down

0 comments on commit e57234a

Please sign in to comment.