-
Notifications
You must be signed in to change notification settings - Fork 99
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
add itests for camel-cxfrs-kafka-connector #996 #1099
Conversation
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.
Looks in the right track, but I'd advise applying a few changes to ensure it's runs reliably on GH actions.
} | ||
|
||
|
||
public abstract static class AbstractTestProcessor implements Processor { |
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.
I'd probably look into moving these processing code to a separate Camel-based test service (in a similar way to the one we have in the syslog tests, for example). That way, we can potentially reuse more test code when adding new scenarios to this.
* A simple test case that checks whether the CXF RS Consumer Endpoint produces the expected number of | ||
* messages | ||
*/ | ||
public class CamelSourceCXFRSITCase extends AbstractKafkaTest { |
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.
I'd try using the CamelSourceTestSupport class as the base class for the tests, as it abstracts away some of the setup, test logic and tear down complexity.
|
||
protected static final int PORT = NetworkUtils.getFreePort("localhost"); | ||
protected static final String CXT = PORT + "/CxfRsConsumerTest"; | ||
protected static final String CXF_RS_ENDPOINT_ADDRESS = "http://localhost:" + CXT + "/rest"; |
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.
I'd use the NetworkUtils.getLocalHostname()
method to avoid problems when running these on misconfigured hosts (we did saw some problems with false positives on Github actions due to this).
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.
Thanks @orpiske for the feedbacks! I will revise accordingly.
… cxfrs-itests-merge
(cherry picked from commit 94929f3)
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.
Looks great, thanks!
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.
Thanks, I think this needs to be backported on camel-master too.
No description provided.