-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Better inheritance support for @Nested when using @SpringIntegration #9492
Comments
Can you share, please, the whole test class to play with? |
Looks like there is something like So, would be great to have some real test to play with. |
Hey, I have spent some time looking to this and there are few things that I found out:
In provided zip, I have overridden that listener and added both fixes One thing that I still didn't figure out is one error when you run
I have also opened PR to fix related issues |
…ntext Switches `MockIntegrationContextCustomizerFactory` to use `TestContextAnnotationUtils` in order to properly support `@NestedTestConfiguration` semantics. Adds an integration test with a base class and several `@Nested` inner test classes to verify the various permutations of `@SpringIntegrationTest` inherit/override behavior when used w/ `@NestedTestConfiguration`.
Fixes: #9492 Issue link: #9492 Switches `MockIntegrationContextCustomizerFactory` & `SpringIntegrationTestExecutionListener` to use `TestContextAnnotationUtils` in order to properly support `@NestedTestConfiguration` semantics. Adds an integration test with a base class and several `@Nested` inner test classes to verify the various permutations of `@SpringIntegrationTest` inherit/override behavior when used w/ `@NestedTestConfiguration`. (cherry picked from commit 3a8e3ab)
Fixes: #9492 Issue link: #9492 Switches `MockIntegrationContextCustomizerFactory` & `SpringIntegrationTestExecutionListener` to use `TestContextAnnotationUtils` in order to properly support `@NestedTestConfiguration` semantics. Adds an integration test with a base class and several `@Nested` inner test classes to verify the various permutations of `@SpringIntegrationTest` inherit/override behavior when used w/ `@NestedTestConfiguration`. (cherry picked from commit 3a8e3ab)
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:
workaround:
Thanks guys for any feedback on this.
The text was updated successfully, but these errors were encountered: