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

chore(deps): bump org.assertj:assertj-core from 3.24.2 to 3.25.0 #5678

Merged
merged 3 commits into from
Jan 2, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.util.function.UnaryOperator;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.assertThrows;

Expand Down Expand Up @@ -319,11 +320,10 @@ void differentResourceVersionConflictEdit() {
.addToData("key", "changed")
.build());
// Then
assertThatThrownBy(patchedCmOp::patch)
.asInstanceOf(InstanceOfAssertFactories.type(KubernetesClientException.class))
assertThatExceptionOfType(KubernetesClientException.class)
.isThrownBy(patchedCmOp::patch)
.hasFieldOrPropertyWithValue("code", 409)
.extracting(KubernetesClientException::getMessage).asString()
.contains("the object has been modified;");
.withMessageContaining("the object has been modified;");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ class DefaultMockServerTest extends Specification {
server.expect().get().withPath("/api/v1/users/watch")
.andUpgradeToWebSocket()
.open()
.immediately().andEmit("READY")
.waitFor(50L).andEmit("READY")
.expectHttpRequest("/api/v1/create").andEmit("CREATED").once()
.expectSentWebSocketMessage("CREATED").andEmit("WS-CREATED").once()
.done()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,13 @@ class DefaultMockServerWebSocketTest extends Specification {
def wsReq = wsClient.webSocket().connect(server.port, server.getHostName(), "/websocket")
and: "A WebSocket listener"
wsReq.onComplete { ws ->
ws.result().closeHandler { _ ->
ws.result().close()
if (ws.result().isClosed()) {
future.complete(ws.result().closeReason())
} else {
ws.result().closeHandler { _ ->
ws.result().close()
future.complete(ws.result().closeReason())
}
}
}
and: "An instance of AsyncConditions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.util.stream.Stream;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down Expand Up @@ -231,8 +232,9 @@ void testRequestTimeout() {
});

Awaitility.await().atMost(10, TimeUnit.SECONDS).until(consumeFuture::isDone);
assertThatThrownBy(consumeFuture::get)
.isInstanceOf(ExecutionException.class).hasCauseInstanceOf(TimeoutException.class);
assertThatExceptionOfType(ExecutionException.class)
.isThrownBy(consumeFuture::get)
.withCauseExactlyInstanceOf(TimeoutException.class);
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

<!-- Testing versions -->
<junit.version>5.10.1</junit.version>
<assertj.core.version>3.24.2</assertj.core.version>
<assertj.core.version>3.25.0</assertj.core.version>
<awaitility.version>4.2.0</awaitility.version>
<approvaltests.version>22.3.3</approvaltests.version>
<mockito.version>4.11.0</mockito.version>
Expand Down
Loading