You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TestVerticle.startTests() catches InvocationTargetExceptions, but in one of my Groovy-based tests, it caught a groovy.lang.MissingMethodException, and tries to handle it. This causes a serialization error in VertxAssert on line 51. This exception is uncaught, and causes no failure to be logged to Vertx, making the test pass as successful.
I tried 'fixing' this by again surrounding the VertxAssert.handleThrowable(targetEx); with a try/catch, but that messes up the output stream for some reason. I haven't found time to look deeper into it, so I don't have a patch to offer. I'm afraid. My workaround so far is to override startTests():
@Override
protected void startTests() {
String methodName = container.config().getString("methodName");
try {
Method m = getClass().getDeclaredMethod(methodName);
m.invoke(this);
} catch (InvocationTargetException e) {
// Conflict with Groovy causes sometimes silent InvocationTargetExceptions, so we always fail here.
VertxAssert.fail(e.getMessage());
} catch (Throwable t) {
// Problem with invoking
VertxAssert.handleThrowable(t);
}
}
The exception causing the problems:
groovy.lang.MissingMethodException: No signature of method: ...
The text was updated successfully, but these errors were encountered:
TestVerticle.startTests() catches InvocationTargetExceptions, but in one of my Groovy-based tests, it caught a groovy.lang.MissingMethodException, and tries to handle it. This causes a serialization error in VertxAssert on line 51. This exception is uncaught, and causes no failure to be logged to Vertx, making the test pass as successful.
I tried 'fixing' this by again surrounding the
VertxAssert.handleThrowable(targetEx);
with a try/catch, but that messes up the output stream for some reason. I haven't found time to look deeper into it, so I don't have a patch to offer. I'm afraid. My workaround so far is to override startTests():The exception causing the problems:
The text was updated successfully, but these errors were encountered: