jihoonson opened a new issue #9180: [DISCUSS] Unit tests for JSON-serializable 
objects
URL: https://github.com/apache/druid/issues/9180
 
 
   I think we have been suffering from the missing JSON property for a while. 
https://github.com/apache/druid/issues/9177 is a good example. To avoid this 
happening in the future, I think we need a sort of automated testing system. 
The system should be able to automatically pick up all objects having a 
constructor annotated with `@JsonCreator` and perform the serde testing. One 
hard thing here is we don't know what data should be provided for testing. I 
think One possible approach would be:
   
   - Adding a new requirement that the author should add a new class for the 
serde testing. The class name should be formatted to be easily recognized by 
our unit testing system such as `{$ObjectName}SerdeTest` when we add a new 
JSON-serializable object. Also we need to add an abstract class which requires 
to implement `getData()` to return data for the serde testing. The abstract 
class checks for all JSON-serializable objects whether there is a corresponding 
unit test class. If it finds the valid test class, it performs all required 
testing. Otherwise returns an error.
   
   Welcome any idea.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to