-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Introduce a way to disable integration tests for certain build types #25025
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.quarkus.test.junit; | ||
|
||
public final class ArtifactTypeUtil { | ||
|
||
private ArtifactTypeUtil() { | ||
} | ||
|
||
public static boolean isContainer(String artifactType) { | ||
return "jar-container".equals(artifactType) || "native-container".equals(artifactType); | ||
} | ||
|
||
public static boolean isNativeBinary(String artifactType) { | ||
return "native".equals(artifactType); | ||
} | ||
|
||
public static boolean isJar(String artifactType) { | ||
return "jar".equals(artifactType); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,18 @@ | |
* Reason for disabling this test | ||
*/ | ||
String value() default ""; | ||
|
||
/** | ||
* The types of Quarkus application produced by the build for which this test is disabled. | ||
* For example, if the tests are supposed to be disabled for built containers only, | ||
* {@code ArtifactType.CONTAINER} would be set. | ||
*/ | ||
ArtifactType[] forArtifactTypes() default { ArtifactType.ALL }; | ||
|
||
enum ArtifactType { | ||
ALL, | ||
JAR, | ||
CONTAINER, | ||
NATIVE_BINARY, | ||
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. Would be nice to have 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. How come? Is there a reason you would want to run tests for jar container and not a native container? 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. Maybe. Could think of a configuration/profile that uses an on-heap cache (e.g. caffeine) with an uber-jar, but no cache with a native image (because caches are not sooo great with serial GC in native images from GraalVM community). 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. I would rather not do this unless we have a real need for it 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. Okay |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mind adding javadocs to the corresponding type-strings (like
fast-jar
,uber-jar
, etc)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really want to do this, as these strings are internal and not meant to be used by anyone but the testing facility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meant the values for
quarkus.package.type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That information isn't available at this point and in any case, for tests it should not make a difference - I mean in what scenario would want to only not execute a test if it's for an
uber-jar
for example?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought it could be useful information for users to associate
quarkus.package.type=fast-jar
with theJAR
enum value.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(javadoc)