Skip to content

Commit

Permalink
Disable Spring tests on Java EA
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphr committed Sep 15, 2024
1 parent c74e62a commit ddc6181
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/java-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [19-ea]
java: [ea]
name: 'Linux JDK ${{ matrix.java }}'
runs-on: ubuntu-latest
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mapstruct.ap.test.decorator.Address;
import org.mapstruct.ap.test.decorator.AddressDto;
Expand Down Expand Up @@ -46,6 +48,7 @@
@ComponentScan(basePackageClasses = Jsr330DecoratorTest.class)
@Configuration
@WithJavaxInject
@DisabledOnJre( JRE.OTHER )
public class Jsr330DecoratorTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
import org.mapstruct.ap.testutil.WithJakartaInject;
import org.mapstruct.ap.testutil.WithJavaxInject;
import org.mapstruct.ap.testutil.runner.GeneratedSource;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import static java.lang.System.lineSeparator;

Expand All @@ -34,8 +32,6 @@
GenderJakartaConstructorMapper.class,
ConstructorJakartaConfig.class
})
@ComponentScan(basePackageClasses = CustomerJakartaConstructorMapper.class)
@Configuration
@WithJakartaInject
@WithJavaxInject
public class JakartaAndJsr330ConstructorMapperTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import org.mapstruct.ap.testutil.WithClasses;
import org.mapstruct.ap.testutil.WithJakartaInject;
import org.mapstruct.ap.testutil.runner.GeneratedSource;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import static java.lang.System.lineSeparator;

Expand All @@ -33,8 +31,6 @@
GenderJakartaConstructorMapper.class,
ConstructorJakartaConfig.class
})
@ComponentScan(basePackageClasses = CustomerJakartaConstructorMapper.class)
@Configuration
@WithJakartaInject
public class JakartaConstructorMapperTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.mapstruct.ap.testutil.WithClasses;
import org.mapstruct.ap.testutil.WithJakartaInject;
import org.mapstruct.ap.testutil.runner.GeneratedSource;
import org.springframework.context.annotation.Configuration;

import static java.lang.System.lineSeparator;

Expand All @@ -32,7 +31,6 @@
SetterJakartaConfig.class
})
@IssueKey("3229")
@Configuration
@WithJakartaInject
public class JakartaSetterMapperTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
Expand Down Expand Up @@ -44,6 +46,7 @@
@ComponentScan(basePackageClasses = CustomerJsr330DefaultCompileOptionFieldMapper.class)
@WithJavaxInject
@Configuration
@DisabledOnJre( JRE.OTHER )
public class Jsr330DefaultCompileOptionFieldMapperTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
Expand Down Expand Up @@ -44,6 +46,7 @@
@ComponentScan(basePackageClasses = CustomerJsr330CompileOptionConstructorMapper.class)
@Configuration
@WithJavaxInject
@DisabledOnJre( JRE.OTHER )
public class Jsr330CompileOptionConstructorMapperTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
Expand Down Expand Up @@ -44,6 +46,7 @@
@ComponentScan(basePackageClasses = CustomerJsr330ConstructorMapper.class)
@Configuration
@WithJavaxInject
@DisabledOnJre( JRE.OTHER )
public class Jsr330ConstructorMapperTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
Expand Down Expand Up @@ -46,6 +48,7 @@
@ComponentScan(basePackageClasses = CustomerJsr330FieldMapper.class)
@Configuration
@WithJavaxInject
@DisabledOnJre( JRE.OTHER )
public class Jsr330FieldMapperTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerDto;
import org.mapstruct.ap.test.injectionstrategy.shared.CustomerEntity;
Expand Down Expand Up @@ -42,6 +44,7 @@
@ComponentScan(basePackageClasses = CustomerJsr330SetterMapper.class)
@Configuration
@WithJavaxInject
@DisabledOnJre( JRE.OTHER )
public class Jsr330SetterMapperTest {

@RegisterExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.junit.jupiter.api.condition.DisabledOnJre;
import org.junit.jupiter.api.condition.JRE;

/**
* Meta annotation that adds the needed Spring Dependencies
*
Expand All @@ -23,6 +26,7 @@
"spring-beans",
"spring-context"
})
@DisabledOnJre( JRE.OTHER )
public @interface WithSpring {

}

0 comments on commit ddc6181

Please sign in to comment.