Skip to content

Commit f8c8510

Browse files
committed
fix(server): init in ServerTestRunner and factory Jooby tests
Call server.init after test server options are finalized and before start for integration tests that no longer rely on Jooby constructor init.
1 parent d645788 commit f8c8510

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎modules/jooby-test/src/main/java/io/jooby/test/JoobyExtension.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ private Jooby startApp(ExtensionContext context, JoobyTest metadata) throws Exce
8686
}
8787
} else {
8888
app = fromFactoryMethod(context, metadata, factoryMethod);
89+
server.init(app);
8990
server.start(app);
9091
}
9192
ExtensionContext.Store store = getStore(context);

‎tests/src/test/java/io/jooby/junit/ServerTestRunner.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public void ready(SneakyThrows.Consumer2<WebClient, WebClient> onReady) {
106106
if (options.isSSLEnabled()) {
107107
options.setSecurePort(0);
108108
}
109+
server.init(app);
109110
WebClient https = null;
110111
try {
111112
MutedServer.mute(server).start(app);

0 commit comments

Comments
 (0)