Skip to content
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

Fix and refactor the scope of some resources #519

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
- name: Test in Native mode
run: |
mvn -fae -V -B --no-transfer-progress -s .github/mvn-settings.xml -fae clean verify -Dnative \
-Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=7g \
-Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=8g \
-Dquarkus.native.builder-image=quay.io/quarkus/${{ matrix.image }}
- name: Zip Artifacts
if: failure()
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
shell: bash
run: |
# Build on Native requires a lot of disk space, for now, we'll run only one module.
mvn -V -B --no-transfer-progress -s .github/mvn-settings.xml -fae clean verify -Dnative -Dquarkus.native.native-image-xmx=7g -pl '003-quarkus-many-extensions'
mvn -V -B --no-transfer-progress -s .github/mvn-settings.xml -fae clean verify -Dnative -Dquarkus.native.native-image-xmx=8g -pl '003-quarkus-many-extensions'
- name: Zip Artifacts
shell: bash
if: failure()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:

MODULES_ARG="${CHANGED// /,}"
mvn -am -fae -V -B --no-transfer-progress -s .github/mvn-settings.xml -fae -pl $MODULES_ARG clean verify -Dnative \
-Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=7g \
-Dquarkus.native.container-build=true -Dquarkus.native.native-image-xmx=8g \
-Dquarkus.native.builder-image=quay.io/quarkus/${{ matrix.image }}
- name: Zip Artifacts
if: failure()
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
shell: bash
run: |
mvn -V -B --no-transfer-progress -s .github/mvn-settings.xml -fae clean verify -Dnative \
-Dquarkus.native.native-image-xmx=7g \
-Dquarkus.native.native-image-xmx=8g \
-pl '003-quarkus-many-extensions'
- name: Zip Artifacts
shell: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@

import org.junit.jupiter.api.Test;

import io.quarkus.test.common.TestResourceScope;
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;
import io.quarkus.test.junit.QuarkusTest;

@QuarkusTest
@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.RESTRICTED_TO_CLASS)
public class ItemsResourceTest {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@

import org.junit.jupiter.api.Test;

import io.quarkus.test.common.TestResourceScope;
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;
import io.quarkus.test.junit.QuarkusTest;

@QuarkusTest
@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.RESTRICTED_TO_CLASS)
public class TransactionScopeBeanResourceTest {

private static final String TRANSACTION_SCOPE_BASE_PATH = "/transaction-scope";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@

import org.junit.jupiter.api.Test;

import io.quarkus.test.common.TestResourceScope;
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;
import io.quarkus.test.junit.QuarkusTest;

@QuarkusTest
@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.RESTRICTED_TO_CLASS)
public class JakartaPersistenceAndHibernateValidatorResourceTest {

@Test
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;

@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.MATCHING_RESOURCES)
@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.GLOBAL)
public class TestResources {
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@
import org.junit.jupiter.api.Test;

import io.quarkus.qe.spring.data.model.Book;
import io.quarkus.test.common.TestResourceScope;
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.http.ContentType;
import io.restassured.response.Response;

@QuarkusTest
@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.MATCHING_RESOURCES)
public class BookResourceTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
import org.junit.jupiter.api.Test;

import io.quarkus.qe.spring.data.model.Cat;
import io.quarkus.test.common.TestResourceScope;
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.http.ContentType;
import io.restassured.response.Response;

@QuarkusTest
@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.MATCHING_RESOURCES)
public class CatResourceTest {
@Test
void testCustomFindPublicationYearObjectBoolean() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import io.quarkus.test.common.TestResourceScope;
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.Headers;
import io.restassured.response.Response;

@QuarkusTest
@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.MATCHING_RESOURCES)
public class CommonsHeadersTest {
//This is for regression test for https://github.com/quarkusio/quarkus/pull/12234
@Test
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@

import io.quarkus.arc.Arc;
import io.quarkus.arc.InjectableBean;
import io.quarkus.test.common.TestResourceScope;
import io.quarkus.test.common.WithTestResource;
import io.quarkus.test.h2.H2DatabaseTestResource;
import io.quarkus.test.junit.QuarkusTest;

import jakarta.enterprise.inject.spi.CDI;

@QuarkusTest
@WithTestResource(value = H2DatabaseTestResource.class, scope = TestResourceScope.MATCHING_RESOURCES)
public class SpringDiTest {

private static Stream<Class<?>> beanClassProvider() {
Expand Down