cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <blackn...@gmail.com>
Subject Re: In memory DB for unit testing
Date Wed, 02 May 2018 21:42:56 GMT
Yeah, I completely understand, plus in-memory is faster.  I never got
ambitious enough to make it more configurable so I could pick which
location for which test.  Ideally, when a test is stable, it should run
in-memory, but I still liked the forensics of on-disk.


On Wed, May 2, 2018 at 5:40 PM Mike Kienenberger <mkienenb@gmail.com> wrote:

> The reason I went with having the db entirely in memory was to run
> tests in parallel.  Once you have a disk presence, you'll have to
> worry about test collisions.
>
> On Wed, May 2, 2018 at 5:35 PM, Michael Gentry <blacknext@gmail.com>
> wrote:
> > Hi Ken,
> >
> > To add to what Mike said, I've used H2 in the past with pretty good
> > results.  You can either let Cayenne create your schema or use something
> > like Flyway/Liquibase if you have that integrated into your application
> > already.
> >
> > One thing I do differently, though, is I create a temporary on-disk DB
> > instead of in-memory DB.  I've found that when a test fails, I can use
> the
> > H2Console utility to examine the leftover on-disk DB to see what it looks
> > like.  On successful tests, though, I close the DB connection and delete
> > it, ready to start over with a clean slate after that.
> >
> > mrg
> >
> >
> > On Wed, May 2, 2018 at 3:59 PM Ken Anderson <ken.anderson@amphorainc.com
> >
> > wrote:
> >
> >> All,
> >>
> >> We’re thinking about setting up an in-memory database in place of SQL
> >> Server for doing unit tests.  Does anyone have any experience doing this
> >> with Cayenne?  Any recommendations or warnings?
> >>
> >> Thanks,
> >> Ken
> >> Confidentiality Notice: This e-mail and accompanying documents contain
> >> confidential information intended for a specific individual and purpose.
> >> This e-mailed information is private and protected by law. If you are
> not
> >> the intended recipient, you are hereby notified that any disclosure,
> >> copying, or distribution, or the taking of any action based on the
> contents
> >> of this information, is strictly prohibited.
> >>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message