So this is the first time I am trying to write unit test for my sping-boot-application in java(it seems surprising but yes :D).
I was trying to use h2 db for my unit test, But I figured out there are some restrictions of this in memory db. When I try to run my unit tests. It's showing me error like.
2018-10-31 15:32:21.796 [] [] [Test worker] ERROR org.hibernate.tool.hbm2ddl.SchemaExport :485 - Unknown data type: "JSON"; SQL statement:
I instantly jumped to google how can it possible, then I discovered that h2 db does not support JSON
fields. Although there are some workarounds to skip the JSON data but as I am using @Type
So, I can't using workarounds like changing to Text or something.
I am curious is there any other method I can use to complete my unit testing using some other in memory db.