forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make picocli tests definitely work in JVM mode
- Loading branch information
1 parent
25ec295
commit f597355
Showing
5 changed files
with
238 additions
and
30 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
core/deployment/src/main/java/io/quarkus/deployment/dev/testing/CurrentTestApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.quarkus.deployment.dev.testing; | ||
|
||
import java.util.function.Consumer; | ||
|
||
import io.quarkus.bootstrap.app.CuratedApplication; | ||
|
||
/** | ||
* This class is a bit of a hack, it provides a way to pass in the current curratedApplication into the TestExtension | ||
* TODO It is only needed for QuarkusMainTest, so we may be able to find a better way. | ||
* For example, what about JUnit state? | ||
*/ | ||
public class CurrentTestApplication implements Consumer<CuratedApplication> { | ||
public static volatile CuratedApplication curatedApplication; | ||
|
||
@Override | ||
public void accept(CuratedApplication c) { | ||
curatedApplication = c; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.