Adding unit tests for microcks-util
Description
- [x] SchemaMap
- [x] JsonSchemValidatorQuery
- [x] XmlErrorHandler
- [x] XmlSchemaURLResolver
- [x] XmlSchemaValidator
- [x] XmlUtil
Related issue(s)
- Resolves #1193
👋 @Harsh4902
Welcome to the Microcks community! 💖
Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly.
Hope you have a great time there!
@lbroudoux with this PR, I am planning to add unit tests for all the classes which I have mentioned in description. Please check the unit test which I have written for SchemaMap and review it.
Awesome! Can you fix the DCO check by signing the commits please? This is a prequisites for CNCF projects.
@lbroudoux can we use mockito in unit test to mock some functionality?
Yes. Mockito is already available on webapp module. Just be sure to align the versions used.
This looks super promising! Thanks a lot for this contribution! Eager to merge it!
@lbroudoux Thank you. I will make changes as per your suggestions.
All good for the headers!
@lbroudoux created unit tests for all the classes of microcks-util module. Now you can merge this branch.
It looks like the code is not formatted correctly. Can you run mvn spotless:apply on the module and then push again?
@lbroudoux I have corrected it.
It looks like some tests are. failing here: https://github.com/microcks/microcks/actions/runs/9642663551/job/26599414197?pr=1210#step:4:1463 Could you have a look at it?
@lbroudoux I have used mvn test inside microcks-util and all tests are running perfectly on my machine.
you can see output here:
I think the error is due to the version of the maven-surefire-plugin that is picked by the build. On my machine, it also works with a surefire version of 3.0. I'll try to fix this in the pom.xml.
Hum I think we can keep this one open as It's shouldn't be that hard to fix. Give me a few minutes to figure this out.
Hum I think we can keep this one open as It's shouldn't be that hard to fix. Give me a few minutes to figure this out.
Yeah, sure.
Ok. I reproduce it on my machine. It's actually because the build is picking maven-surefire-plugin 2.12.4. Don't know why at the moment but investigating.
I think I have the fix. I have re-opened #1151 and will put the fix here. Please rebase your branch and re-push once it is commited.
It has been pushed
I have rebased it.
Your tests are now ok, but it looks like, as a side effect, some others are failing... I don't succeed in reproducing this at the moment.
I really don't see the cause of failure here... Could you confirm it still works on your side or not? If it works maybe just put additional logs in the tests at failure locations so that we can try to guess what can go wrong..
@lbroudoux I am working on failing tests from my side.
Do you have the same result than GitHub Action build?
Do you have the same result than GitHub Action build?
No, it's still working fine on my machine but, I am trying to find the issue in github action.
Hey @Harsh4902 Thanks for the latest update. It looks like everything is now working fine on my side!! I think we can proceed to merge.
🎉 @Harsh4902
You are now a Microcks community contributor! 💖
Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏
📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact.
If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌"
Kudos and please keep going, we need you 🙌
@lbroudoux Thank you for merging this PR. I am looking forward to contribute more in microcks.