Skip to content

Commit

Permalink
new packages and exception check (#272)
Browse files Browse the repository at this point in the history
Co-authored-by: navery-max <[email protected]>
  • Loading branch information
bluemonk3y and navery-max authored Feb 24, 2024
1 parent a9b276f commit 9edfa2b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ plugins {
java
`maven-publish`
signing
id("com.github.spotbugs") version "5.1.3"
id("com.github.spotbugs") version "6.0.7"
id("com.diffplug.spotless") version "6.25.0"
id("pl.allegro.tech.build.axion-release") version "1.16.1"
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("com.bmuschko.docker-remote-api") version "9.3.6" apply false
id("com.bmuschko.docker-remote-api") version "9.4.0" apply false
}

project.version = scmVersion.version
Expand Down Expand Up @@ -74,7 +74,7 @@ subprojects {
set("medeiaValidatorVersion", "1.1.0")
set("junitVersion", "5.10.1")
set("mockitoVersion", "5.10.0")
set("junitPioneerVersion", "2.1.0")
set("junitPioneerVersion", "2.2.0")
set("spotBugsVersion", "4.8.3")
set("hamcrestVersion", "1.3")
set("log4jVersion", "2.22.1") // https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core
Expand Down
19 changes: 19 additions & 0 deletions cli/src/test/java/io/specmesh/cli/ProvisionFunctionalTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;

import io.specmesh.kafka.DockerKafkaEnvironment;
import io.specmesh.kafka.KafkaEnvironment;
import io.specmesh.kafka.provision.Status;
import io.specmesh.kafka.provision.TopicProvisioner.Topic;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.kafka.clients.admin.ListTopicsResult;
Expand All @@ -50,6 +53,22 @@ void shouldProvisionCmdWithLombock() throws Exception {
assertThat(provision.brokerUrl(), is("borker"));
}

@Test
void shouldNotSwallowExceptions() throws Exception {
final var topic = Topic.builder().build();
final var swallowed =
Status.builder()
.topics(
List.of(
topic.exception(
new RuntimeException(
new RuntimeException("swallowed")))))
.build();
assertThat(
swallowed.topics().iterator().next().exception().toString(),
containsString(".java:"));
}

/**
* Provision all resources apart from schemas. note: Dont specify SR credentials to avoid schema
* publishing
Expand Down
2 changes: 1 addition & 1 deletion kafka/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dependencies {

implementation("org.apache.kafka:kafka-streams:$kafkaVersion")
implementation("org.apache.kafka:kafka-clients:$kafkaVersion")
implementation("commons-io:commons-io:2.15.0")
implementation("commons-io:commons-io:2.15.1")
implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion")

Expand Down
2 changes: 1 addition & 1 deletion kafka/src/main/java/io/specmesh/kafka/KafkaApiSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
import org.apache.kafka.common.resource.ResourceType;

/** Kafka entity mappings from the AsyncAPISpec */
public class KafkaApiSpec {
public final class KafkaApiSpec {

private static final String GRANT_ACCESS_TAG = "grant-access:";

Expand Down

0 comments on commit 9edfa2b

Please sign in to comment.