Skip to content

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

Closed

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Sep 6, 2023

  • Simplify produce/consume verify via OutputCapture

  • Remove spring-boot-smoke-test-pulsar-reactive as no other smoke tests split them out

* Simplify produce/consume verify via OutputCapture

* Remove spring-boot-smoke-test-pulsar-reactive as
  no other smoke tests split them out
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 6, 2023
@@ -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" />
Copy link
Contributor Author

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))
Copy link
Contributor Author

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
Copy link
Contributor Author

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")
Copy link
Contributor Author

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).

philwebb pushed a commit that referenced this pull request Sep 6, 2023
* Simplify produce/consume verify via OutputCapture

* Remove spring-boot-smoke-test-pulsar-reactive as
  no other smoke tests split them out

See gh-37196
philwebb added a commit that referenced this pull request Sep 6, 2023
@philwebb philwebb closed this in db73e07 Sep 6, 2023
@wilkinsona wilkinsona added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 6, 2023
@wilkinsona wilkinsona added this to the 3.2.0-M3 milestone Sep 6, 2023
@onobc onobc deleted the cbono-combine-pulsar-smoketests branch May 28, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants