Skip to content

Commit

Permalink
Execute simple JUnit tests and @QuarkusComponentTest first
Browse files Browse the repository at this point in the history
I was hoping to constrain JUnit tests and @QuarkusComponentTests but
@QuarkusComponentTest is in another artifact so this will have to do.

Related to #46035.

Note that you can still break things if you specify another priority but
that's how it is :).
  • Loading branch information
gsmet authored and geoand committed Feb 6, 2025
1 parent 1aa5dae commit b538fbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
*/
public class QuarkusTestProfileAwareClassOrderer implements ClassOrderer {

protected static final String DEFAULT_ORDER_PREFIX_NON_QUARKUS_TEST = "10_";
protected static final String DEFAULT_ORDER_PREFIX_QUARKUS_TEST = "20_";
protected static final String DEFAULT_ORDER_PREFIX_QUARKUS_TEST_WITH_MATCHING_RES = "30_";
protected static final String DEFAULT_ORDER_PREFIX_QUARKUS_TEST_WITH_PROFILE = "40_";
protected static final String DEFAULT_ORDER_PREFIX_QUARKUS_TEST_WITH_RESTRICTED_RES = "45_";
protected static final String DEFAULT_ORDER_PREFIX_NON_QUARKUS_TEST = "60_";

static final String CFGKEY_ORDER_PREFIX_QUARKUS_TEST = "junit.quarkus.orderer.prefix.quarkus-test";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ void allVariants() {
new QuarkusTestProfileAwareClassOrderer().orderClasses(contextMock);

assertThat(input).containsExactly(
nonQuarkusTest1Desc,
nonQuarkusTest2Desc,
quarkusTest1Desc,
quarkusTest1aDesc,
quarkusTest2Desc,
Expand All @@ -112,9 +114,7 @@ void allVariants() {
quarkusTestWithRestrictedResourceDesc,
quarkusTestWithRestrictedResourceDesc2,
quarkusTestWithMetaResourceDesc,
quarkusTestWithMetaResourceDesc2,
nonQuarkusTest1Desc,
nonQuarkusTest2Desc);
quarkusTestWithMetaResourceDesc2);
}

@Test
Expand All @@ -124,9 +124,9 @@ void configuredPrefix() {
List<ClassDescriptor> input = Arrays.asList(quarkusTestDesc, nonQuarkusTestDesc);
doReturn(input).when(contextMock).getClassDescriptors();

new QuarkusTestProfileAwareClassOrderer("20_", "30_", "40_", "45_", "01_", Optional.empty()).orderClasses(contextMock);
new QuarkusTestProfileAwareClassOrderer("20_", "30_", "40_", "45_", "60_", Optional.empty()).orderClasses(contextMock);

assertThat(input).containsExactly(nonQuarkusTestDesc, quarkusTestDesc);
assertThat(input).containsExactly(quarkusTestDesc, nonQuarkusTestDesc);
}

@Test
Expand Down

0 comments on commit b538fbd

Please sign in to comment.