Skip to content

Commit d151331

Browse files
committed
Remove deprecated VerxTestContext#succeeding
1 parent 9e22ab6 commit d151331

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

src/main/java/io/vertx/junit5/VertxTestContext.java

-18
Original file line numberDiff line numberDiff line change
@@ -183,24 +183,6 @@ public synchronized Checkpoint checkpoint(int requiredNumberOfPasses) {
183183

184184
// ........................................................................................... //
185185

186-
/**
187-
* Create an asynchronous result handler that expects a success.
188-
*
189-
* @param <T> the asynchronous result type.
190-
* @return the handler.
191-
* @deprecated Use {@link #succeedingThenComplete()} or {@link #succeeding(Handler)}, for example
192-
* <code>succeeding(value -> checkpoint.flag())</code>, <code>succeeding(value -> { more testing code })</code>, or
193-
* <code>succeeding(value -> {})</code>.
194-
*/
195-
@Deprecated
196-
public <T> Handler<AsyncResult<T>> succeeding() {
197-
return ar -> {
198-
if (!ar.succeeded()) {
199-
failNow(ar.cause());
200-
}
201-
};
202-
}
203-
204186
/**
205187
* Create an asynchronous result handler that expects a success, and passes the value to another handler.
206188
*

src/test/java/io/vertx/junit5/tests/VertxTestContextTest.java

-17
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,6 @@ void fail_with_null() {
4444
.hasMessage("The exception cannot be null");
4545
}
4646

47-
@Test
48-
@DisplayName("Check the behavior of succeeding() and that it does not complete the test context")
49-
void check_async_assert() throws InterruptedException {
50-
VertxTestContext context = new VertxTestContext();
51-
context.succeeding().handle(Future.succeededFuture());
52-
assertThat(context.awaitCompletion(1, TimeUnit.MILLISECONDS)).isFalse();
53-
assertThat(context.completed()).isFalse();
54-
55-
context = new VertxTestContext();
56-
context.succeeding().handle(Future.failedFuture(new RuntimeException("Plop")));
57-
assertThat(context.awaitCompletion(1, TimeUnit.MILLISECONDS)).isTrue();
58-
assertThat(context.failed()).isTrue();
59-
assertThat(context.causeOfFailure())
60-
.isInstanceOf(RuntimeException.class)
61-
.hasMessage("Plop");
62-
}
63-
6447
@Test
6548
@DisplayName("Check the behavior of failing()")
6649
void check_async_assert_fail() throws InterruptedException {

0 commit comments

Comments
 (0)