Merge branch 'master' into Implementation_Message_data_digits_are_rounded_#3751
This commit is contained in:
commit
62c04372f1
6 changed files with 12 additions and 19 deletions
|
@ -74,14 +74,12 @@ public class InternalConsumerGroup {
|
|||
|
||||
private static Integer calculateTopicNum(Map<TopicPartition, Long> offsets, Collection<InternalMember> members) {
|
||||
|
||||
long topicNum = Stream.concat(
|
||||
return (int) Stream.concat(
|
||||
offsets.keySet().stream().map(TopicPartition::topic),
|
||||
members.stream()
|
||||
.flatMap(m -> m.getAssignment().stream().map(TopicPartition::topic))
|
||||
).distinct().count();
|
||||
|
||||
return Integer.valueOf((int) topicNum);
|
||||
|
||||
}
|
||||
|
||||
private static Collection<InternalMember> initInternalMembers(ConsumerGroupDescription description) {
|
||||
|
|
|
@ -72,17 +72,14 @@ class JmxMetricsRetriever implements MetricsRetriever, Closeable {
|
|||
KafkaCluster c,
|
||||
Consumer<JMXConnector> consumer) {
|
||||
var env = prepareJmxEnvAndSetThreadLocal(c);
|
||||
try {
|
||||
JMXConnector connector = null;
|
||||
try (JMXConnector connector = JMXConnectorFactory.newJMXConnector(new JMXServiceURL(jmxUrl), env)) {
|
||||
try {
|
||||
connector = JMXConnectorFactory.newJMXConnector(new JMXServiceURL(jmxUrl), env);
|
||||
connector.connect(env);
|
||||
} catch (Exception exception) {
|
||||
log.error("Error connecting to {}", jmxUrl, exception);
|
||||
return;
|
||||
}
|
||||
consumer.accept(connector);
|
||||
connector.close();
|
||||
} catch (Exception e) {
|
||||
log.error("Error getting jmx metrics from {}", jmxUrl, e);
|
||||
} finally {
|
||||
|
|
|
@ -45,12 +45,10 @@ public final class KafkaServicesValidation {
|
|||
*/
|
||||
public static Optional<String> validateTruststore(TruststoreConfig truststoreConfig) {
|
||||
if (truststoreConfig.getTruststoreLocation() != null && truststoreConfig.getTruststorePassword() != null) {
|
||||
try {
|
||||
try (FileInputStream fileInputStream = new FileInputStream(
|
||||
(ResourceUtils.getFile(truststoreConfig.getTruststoreLocation())))) {
|
||||
KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
|
||||
trustStore.load(
|
||||
new FileInputStream((ResourceUtils.getFile(truststoreConfig.getTruststoreLocation()))),
|
||||
truststoreConfig.getTruststorePassword().toCharArray()
|
||||
);
|
||||
trustStore.load(fileInputStream, truststoreConfig.getTruststorePassword().toCharArray());
|
||||
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(
|
||||
TrustManagerFactory.getDefaultAlgorithm()
|
||||
);
|
||||
|
|
|
@ -131,7 +131,7 @@ class TopicsServicePaginationTest {
|
|||
|
||||
assertThat(topics.getBody().getPageCount()).isEqualTo(4);
|
||||
assertThat(topics.getBody().getTopics()).hasSize(1);
|
||||
assertThat(topics.getBody().getTopics().get(0).getName().equals("99"));
|
||||
assertThat(topics.getBody().getTopics().get(0).getName()).isEqualTo("99");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -13,7 +13,7 @@ public class SchemaDetails extends BasePage {
|
|||
protected SelenideElement compatibilityField = $x("//h4[contains(text(),'Compatibility')]/../p");
|
||||
protected SelenideElement editSchemaBtn = $x("//button[contains(text(),'Edit Schema')]");
|
||||
protected SelenideElement removeBtn = $x("//*[contains(text(),'Remove')]");
|
||||
protected SelenideElement confirmBtn = $x("//div[@role='dialog']//button[contains(text(),'Confirm')]");
|
||||
protected SelenideElement schemaConfirmBtn = $x("//div[@role='dialog']//button[contains(text(),'Confirm')]");
|
||||
protected SelenideElement schemaTypeField = $x("//h4[contains(text(),'Type')]/../p");
|
||||
protected SelenideElement latestVersionField = $x("//h4[contains(text(),'Latest version')]/../p");
|
||||
protected SelenideElement compareVersionBtn = $x("//button[text()='Compare Versions']");
|
||||
|
@ -62,8 +62,8 @@ public class SchemaDetails extends BasePage {
|
|||
public SchemaDetails removeSchema() {
|
||||
clickByJavaScript(dotMenuBtn);
|
||||
removeBtn.shouldBe(Condition.enabled).click();
|
||||
confirmBtn.shouldBe(Condition.visible).click();
|
||||
confirmBtn.shouldBe(Condition.disappear);
|
||||
schemaConfirmBtn.shouldBe(Condition.visible).click();
|
||||
schemaConfirmBtn.shouldBe(Condition.disappear);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ public class ProduceMessagePanel extends BasePage {
|
|||
protected SelenideElement keyTextArea = $x("//div[@id='key']/textarea");
|
||||
protected SelenideElement valueTextArea = $x("//div[@id='content']/textarea");
|
||||
protected SelenideElement headersTextArea = $x("//div[@id='headers']/textarea");
|
||||
protected SelenideElement submitBtn = headersTextArea.$x("../../../..//button[@type='submit']");
|
||||
protected SelenideElement submitProduceMessageBtn = headersTextArea.$x("../../../..//button[@type='submit']");
|
||||
protected SelenideElement partitionDdl = $x("//ul[@name='partition']");
|
||||
protected SelenideElement keySerdeDdl = $x("//ul[@name='keySerde']");
|
||||
protected SelenideElement contentSerdeDdl = $x("//ul[@name='valueSerde']");
|
||||
|
@ -48,8 +48,8 @@ public class ProduceMessagePanel extends BasePage {
|
|||
|
||||
@Step
|
||||
public ProduceMessagePanel submitProduceMessage() {
|
||||
clickByActions(submitBtn);
|
||||
submitBtn.shouldBe(Condition.disappear);
|
||||
clickByActions(submitProduceMessageBtn);
|
||||
submitProduceMessageBtn.shouldBe(Condition.disappear);
|
||||
refresh();
|
||||
return this;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue