Skip to content

Commit bb1b6b8

Browse files
authored
Merge pull request #3781 from goncalo-andrade/main
Make JoobyExtension start the app whilst the 'application.env' property is set
2 parents 5e23897 + 63a3e53 commit bb1b6b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,16 @@ private Jooby startApp(ExtensionContext context, JoobyTest metadata) throws Exce
7575
var defaultEnv = System.getProperty("application.env");
7676
System.setProperty("application.env", metadata.environment());
7777
app = Jooby.createApp(server, metadata.executionMode(), reflectionProvider(metadata.value()));
78+
server.start(app);
7879
if (defaultEnv != null) {
7980
System.setProperty("application.env", defaultEnv);
8081
} else {
8182
System.getProperties().remove("application.env");
8283
}
8384
} else {
8485
app = fromFactoryMethod(context, metadata, factoryMethod);
86+
server.start(app);
8587
}
86-
server.start(app);
8788
ExtensionContext.Store store = getStore(context);
8889
store.put("server", server);
8990
store.put("application", app);

0 commit comments

Comments
 (0)