You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify the ModelTestCase model's mapper to use only one fixedly or both to use both fixedly.
What problems are you trying to solve?
I don't think it's good code if a test passes or breaks randomly. It seems like a good idea to organize the reasons for using two mappers and improve it so that they are always used when both are needed.
What is the developer experience going to be?
No more cases of partially passing or failing tests
Hi @channel-dante and @dblock , we are adding a default Mapper in JsonUtils in this PR , please follow this comment to know the context, I think we can use that , rather than hardcoding one of them, the idea is to take the provider from the classpath instead of hardcoding one of the jakarta or Jackson
Caution : the methods in the mapper are overridden to provide support for the classes which implement JsonpSerializable
I investigated ModelTestCase and confirmed it still randomly chooses between JsonbJsonpMapper and JacksonJsonpMapper using RAND.
Since the proposed JsonUtils mentioned in the discussion doesn't exist in the current main branch, I'd like to confirm the expected solution before implementing it.
Should ModelTestCase:
Always use a single mapper (Jackson or JsonB), or
Be updated to run deterministically with both mappers?
What/Why
What are you proposing?
What problems are you trying to solve?
What is the developer experience going to be?