-
Notifications
You must be signed in to change notification settings - Fork 304
Fix vertx worker propagation and error handling #8237
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,13 @@ public class VertxTestServer extends AbstractVerticle { | |
public static final String CONFIG_HTTP_SERVER_PORT = "http.server.port"; | ||
public static final String PORT_DATA_ADDRESS = "PORT_DATA"; | ||
|
||
int fibonacci(int n) { | ||
if (n <= 1) { | ||
return n; | ||
} | ||
return fibonacci(n - 1) + fibonacci(n - 2); | ||
} | ||
Comment on lines
+42
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "can you evaluate the complexity of this code ?" 😂 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LOL..It's actually from the customer reproducer and it's useful to simulate some processing time |
||
|
||
@Override | ||
public void start(final Promise<Void> startPromise) { | ||
final int port = config().getInteger(CONFIG_HTTP_SERVER_PORT); | ||
|
@@ -53,8 +60,10 @@ public void start(final Promise<Void> startPromise) { | |
controller( | ||
ctx, | ||
SUCCESS, | ||
() -> | ||
ctx.response().setStatusCode(SUCCESS.getStatus()).end(SUCCESS.getBody()))); | ||
() -> { | ||
fibonacci(40); | ||
ctx.response().setStatusCode(SUCCESS.getStatus()).end(SUCCESS.getBody()); | ||
})); | ||
router | ||
.route(FORWARDED.getPath()) | ||
.handler( | ||
|
Uh oh!
There was an error while loading. Please reload this page.