-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Contract test example for message queue in clojure #1099
Comments
Oh, wow! Clojure still around! :-D There are no examples that I know of. In fact, this is the first time I've heard of someone trying to do message queue Pact tests with Clojure. The main issue with message queue tests is they invoke a method to either generate the message (on the provider side) or process the message (on the consumer side). The JUnit examples use annotated methods for this. So there are a few options:
|
Hi @uglyog - I prefer the second option. Do you think you can accommodate this in near future? |
Hi @uglyog |
Can you write you Clojure test now? If you could contribute an example test for the project, it would be helpful for other people. |
Hi @uglyog I have tried the clojure provider verification using dependency
Error
Can someone help here please |
Hey @dpunna-ut We have an existing kafka springboot example provider https://github.com/pactflow/example-provider-java-kafka I am very new to clojure. Is there any change you could create a simple example repo, maybe modelled on the above. I can see you are using kafka in your example code. Maybe that way we can provide both an example for clojure, and then have the ability to have a codebase to test against, to improve the lien plugin to support message providers. |
So I took a look at this example project https://github.com/uglyog/pact-lein-test and noted that I am unable to publish verification results when verifying a pact by url, and I can't seem to retrieve via a PactBrokerSource with consumer version selectors using the lein plugin. the verifying pact by url issue not publishing results, is also raised here There is an example of a consumer test using junit annotations. an example on the consumer side is here I wonder if you can work backwards from a message pact provider example in junit Line 67 in 46ae177
as currently it looks like you would need to extend the current lein plugin for a few features for it to be suitable (pact broker source, publish verification results, add message pact support) |
Could you please point me to some example for writing message queue pact tests. If clojure examples are not possible then java example will also work.
I am having trouble finding equivalent of ConsumerPactRunner/runConsumerTest which excepts the MessagePact instead of RequestResponsePact.
Example for both consumer and producer would help.
The text was updated successfully, but these errors were encountered: