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

Add failNow method that accepts string in VertxTestContext #87

Closed
ndr-brt opened this issue Oct 7, 2020 · 0 comments
Closed

Add failNow method that accepts string in VertxTestContext #87

ndr-brt opened this issue Oct 7, 2020 · 0 comments

Comments

@ndr-brt
Copy link

ndr-brt commented Oct 7, 2020

At the moment when I need to fail the text context, there's only this method:

public synchronized void failNow(Throwable t)

that forces me, everytime, to specify a throwable, that's not interesting for my test:

test.failNow(new RuntimeException("should fail"));

Can be a good idea to define an utility method, like class Promise defines two tryFail methods:
https://github.com/eclipse-vertx/vert.x/blob/ecd0a3b4ca161d5a4727e33b00b5d90daafde8e8/src/main/java/io/vertx/core/Promise.java#L131

Something like:

public synchronized void failNow(String message) {
  failNow(new NoStackTraceThrowable(message));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants