-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Milestone
Description
Expected Behavior
I have @SpringIntegration(noAutoStartup = {"*"}) defined in abstract class that holds all integration tests to disable all IntegrationFlows by default
When @nested class is used in some test, same configuration (@SpringIntegration(noAutoStartup = {"*"})) is applied to that nested class as well
Current Behavior
class annotated with @nested doesn't have that annotation inherited, that leads to starting all IntegrationFlows during test, that is not intended
Context
Without this feature, it leads to unexpected IntegrationFlow startup
sample for demonstration:
@SpringIntegrationTest(noAutoStartup = {"*"})
class AbstractIntegrationTest {}
class SomeIntegrationTest extends AbstractIntegrationTest {
// all beans autoStarted just because of this
@Nested
class SomeNestedTest {
@Test
void test() {}
}
}
workaround:
- Have IT profile defined and used when running integration tests
- Define IntegrationFlow beans with non-"IT" profile ( @Profile("!it") )
Thanks guys for any feedback on this.