spring - An H2 embedded database with oracle syntax? -


i have set h2 datasource oracle mode both in connector string , in init script set mode oracle;

however, many functions cannot executed; such date trunc function, quite common in our code.

what practical way test out db applications? looks may have go full-blown qa/dev test oracle instance. indeed, implement syntactical replica of oracle huge task, can imagine lightweight in-memory dbs testing going miss many oracle features.

how approach problem?

in opinion unit testing , integration testing should distinguished. unit testing should not have external dependencies, should mock dao classes (eg: using mockito). testing against real database should done during integration testing.

as might have seen problem using embedded database during unit testing syntax might different production database.

one approach mitigate setup integration testing environment (eg: using bamboo ci tool) have dedicated production-like (oracle) database testing. test as can using embedded database, can't test later on integration environment.

this integration testing environment sit on own server shared dev team members. tool such bamboo can auto detect when new commit made, , launch integration testing


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -