-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Combine Pulsar smoke tests #37196
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
Combine Pulsar smoke tests #37196
Conversation
* Simplify produce/consume verify via OutputCapture * Remove spring-boot-smoke-test-pulsar-reactive as no other smoke tests split them out
@@ -32,6 +32,7 @@ | |||
<suppress files="[\\/]spring-boot-docs[\\/].*MyConfiguration__BeanDefinitions" checks="JavadocMethod|SpringHideUtilityClassConstructor" /> | |||
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="JavadocPackage|JavadocType" /> | |||
<suppress files="[\\/]spring-boot-smoke-tests[\\/]" checks="ImportControl" /> | |||
<suppress files="[\\/]spring-boot-smoke-tests[\\/].*SamplePulsarApplicationTests" checks="SpringHideUtilityClassConstructor" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a better way, please show me.
expectedOutput.add("++++++PRODUCE IMPERATIVE:(" + i + ")------"); | ||
expectedOutput.add("++++++CONSUME IMPERATIVE:(" + i + ")------"); | ||
}); | ||
Awaitility.waitAtMost(Duration.ofSeconds(30)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using captured output simplifies by removing the need for the message consumer component and the list of messages etc..
.pollInterval(Duration.ofMillis(500)) | ||
.untilAsserted(() -> hasExpectedIds(consumer)); | ||
@Nested | ||
@SpringBootTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While these do not use the same spring boot context, they do share the single pulsar container and this makes the test about 2x as fast.
@SpringBootApplication | ||
public class SampleReactivePulsarApplication { | ||
@Configuration(proxyBeanMethods = false) | ||
@Profile("smoketest.pulsar.reactive") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the profile approach works well w/ the @ActiveProfiles
on the @Nested
SBT. I guess the alternative is to use the @SpringBootTest(classes = ...
and point directly to a specific app class (imperative or reactive).
* Simplify produce/consume verify via OutputCapture * Remove spring-boot-smoke-test-pulsar-reactive as no other smoke tests split them out See gh-37196
Simplify produce/consume verify via OutputCapture
Remove spring-boot-smoke-test-pulsar-reactive as no other smoke tests split them out