Skip to content
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

Solace Read connector: integration tests with testcontainers #31543

Merged
merged 3 commits into from
Jul 9, 2024

Conversation

bzablocki
Copy link
Contributor

@bzablocki bzablocki commented Jun 7, 2024

The PR for the Solace Read connector (addresses #31440).

The files that are relevant in this PR (only the last commit):

  • BeamModulePlugin.groovy
  • build.gradle
  • SolaceContainerManager.java
  • SolaceIOIT.java
    Other modified files in this pr are included in PRs that this one depends on.

This PR implements a basic integration test with testcontainers. It can be improved with the Write connector, once that is submitted and merged.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

Copy link
Contributor

github-actions bot commented Jun 7, 2024

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@bzablocki
Copy link
Contributor Author

Run Java PreCommit

@bzablocki
Copy link
Contributor Author

Assign set of reviewers

Copy link
Contributor

github-actions bot commented Jul 2, 2024

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @robertwb for label java.
R: @Abacn for label build.
R: @johnjcasey for label io.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

String queueName = "test_queue";
solaceContainerManager.createQueueWithSubscriptionTopic(queueName);

// todo this is very slow, needs to be replaced with the SolaceIO.write connector.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this slow? if its because of syncronous work, you could spin up a parallel thread pool

Copy link
Contributor Author

@bzablocki bzablocki Jul 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I actually meant here is that this method may not be ideal for performance testing with a large number of messages, as it might prove too slow. Parallelization for thousands of messages would likely offer too little improvement. For performance testing we need the write connector, which will come later.

For the current use case with 20 messages, inserting messages takes 2-second processing time on my machine. However, considering the overall Testcontainers setup time, this delay is relatively minor. WDYT?

@Abacn Abacn merged commit 88aa253 into apache:master Jul 9, 2024
30 checks passed
acrites pushed a commit to acrites/beam that referenced this pull request Jul 17, 2024
…31543)

* Add integration tests

* Use random exposed ports for testcontainers

* Add info flag to gradle integrationTest command for extensive info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants