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

Bump dropwizard.version from 2.0.22 to 2.0.23 #580

Merged
merged 2 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 35 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.kiwiproject</groupId>
<artifactId>kiwi-parent</artifactId>
<version>0.12.0</version>
<version>0.14.0</version>
</parent>

<artifactId>kiwi</artifactId>
Expand Down Expand Up @@ -34,11 +34,11 @@
<guava.version>30.1.1-jre</guava.version>

<!-- Versions for provided dependencies -->
<commons-io.version>2.8.0</commons-io.version>
<commons-io.version>2.10.0</commons-io.version>
<commons-text.version>1.9</commons-text.version>
<dropwizard.version>2.0.22</dropwizard.version>
<dropwizard.version>2.0.23</dropwizard.version>
<FastInfoset.version>1.2.18</FastInfoset.version>
<hibernate.version>5.4.30.Final</hibernate.version>
<hibernate.version>5.5.0.Final</hibernate.version>
<hibernate-validator.version>6.1.7.Final</hibernate-validator.version>
<httpclient.version>4.5.13</httpclient.version>
<jackson.version>[2.10.5,2.10.6)</jackson.version>
Expand All @@ -48,15 +48,15 @@
<jakarta.xml.bind-api.version>2.3.3</jakarta.xml.bind-api.version>
<javassist.version>3.28.0-GA</javassist.version>
<jaxws-rt.version>2.3.3</jaxws-rt.version>
<jboss-logging.version>3.4.1.Final</jboss-logging.version>
<jboss-logging.version>3.4.2.Final</jboss-logging.version>
<joda-time.version>2.10.10</joda-time.version>
<jsch.version>0.1.55</jsch.version>
<metrics-jdbi3.version>4.1.22</metrics-jdbi3.version>
<metrics-jetty9.version>4.1.22</metrics-jetty9.version>
<postgresql.version>42.2.20</postgresql.version>
<retrying-again.version>0.5.1</retrying-again.version>
<spring.version>5.3.7</spring.version>
<spring-data-mongodb.version>2.2.11.RELEASE</spring-data-mongodb.version>
<metrics-jdbi3.version>4.1.23</metrics-jdbi3.version>
<metrics-jetty9.version>4.1.23</metrics-jetty9.version>
<postgresql.version>42.2.22</postgresql.version>
<retrying-again.version>0.6.0</retrying-again.version>
<spring.version>5.3.8</spring.version>
<spring-data-mongodb.version>2.2.13.RELEASE</spring-data-mongodb.version>
<stax2-api.version>4.2.1</stax2-api.version>
<stax-ex.version>1.8.3</stax-ex.version>
<!--
Expand All @@ -77,10 +77,10 @@

<!-- Versions for test dependencies -->
<commons-compress.version>1.20</commons-compress.version>
<embedded-postgres.version>1.2.10</embedded-postgres.version>
<embedded-postgres.version>1.3.0</embedded-postgres.version>
<embed.mongo.version>3.0.0</embed.mongo.version>
<h2.version>1.4.200</h2.version>
<jdbi3.version>3.20.0</jdbi3.version>
<jdbi3.version>3.20.1</jdbi3.version>
<jersey-test-framework-core.version>2.33</jersey-test-framework-core.version>
<liquibase.version>3.10.3</liquibase.version>
<mongo-java-server.version>1.38.0</mongo-java-server.version>
Expand Down Expand Up @@ -168,6 +168,10 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down Expand Up @@ -196,6 +200,10 @@
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -603,6 +611,10 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand All @@ -624,6 +636,10 @@
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-jaxb-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down Expand Up @@ -705,6 +721,12 @@
<artifactId>mongo-java-server</artifactId>
<version>${mongo-java-server.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>

</dependencies>
Expand Down
32 changes: 22 additions & 10 deletions src/test/java/org/kiwiproject/jaxrs/KiwiMultivaluedMapsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ void shouldCreateEmptyMultivaluedMap_WhenNoItems() {
assertThat(mvMap).isEmpty();
}

/**
* @implNote As of AssertJ 3.20.0, the implementation of containsOnly was changed significantly in PR
* https://github.com/assertj/assertj-core/pull/2167/ and as a result broke this test when it used containsOnly
* to verify the map entries. Long story short, it is caused by the new AssertJ implementation cloning the
* MultivaluedMap in a way that it flattens it to a single-valued Map, and the values (which are List) are
* wrapped inside another List, so the comparison completely fails.
*/
@Test
void shouldCreateMultivaluedMap() {
var mvMap = KiwiMultivaluedMaps.newMultivaluedMap(
Expand All @@ -38,11 +45,10 @@ void shouldCreateMultivaluedMap() {
"car", "tesla",
"food", "steak");

assertThat(mvMap).containsOnly(
entry("color", List.of("red")),
entry("food", List.of("pizza", "steak")),
entry("car", List.of("tesla"))
);
assertThat(mvMap).hasSize(3)
.contains(entry("color", List.of("red")))
.contains(entry("food", List.of("pizza", "steak")))
.contains(entry("car", List.of("tesla")));
}
}

Expand All @@ -61,6 +67,13 @@ void shouldCreateEmptyMultivaluedMap_WhenNoItems() {
assertThat(mvMap).isEmpty();
}

/**
* @implNote As of AssertJ 3.20.0, the implementation of containsOnly was changed significantly in PR
* https://github.com/assertj/assertj-core/pull/2167/ and as a result broke this test when it used containsOnly
* to verify the map entries. Long story short, it is caused by the new AssertJ implementation cloning the
* MultivaluedMap in a way that it flattens it to a single-valued Map, and the values (which are List) are
* wrapped inside another List, so the comparison completely fails.
*/
@Test
void shouldCreateMultivaluedMap_WithOnlyOneValuePerKey() {
var mvMap = KiwiMultivaluedMaps.newSingleValuedParameterMap(
Expand All @@ -71,11 +84,10 @@ void shouldCreateMultivaluedMap_WithOnlyOneValuePerKey() {
"food", "hamburgers",
"car", "ferrari");

assertThat(mvMap).containsOnly(
entry("color", List.of("yellow")),
entry("food", List.of("hamburgers")),
entry("car", List.of("ferrari"))
);
assertThat(mvMap).hasSize(3)
.contains(entry("color", List.of("yellow")))
.contains(entry("food", List.of("hamburgers")))
.contains(entry("car", List.of("ferrari")));
}
}

Expand Down