Le mar. 23 oct. 2018 à 09:53, Mark Struberg <strub...@yahoo.de.invalid> a écrit :
> Yes, what I personally like about the approach of kind of half-manually > starting up the DB is that you can later look at the results. And it is WAY > faster than a JUnit rule which runs on every test. > > This part is wrong Mark and you know it since we do it in TomEE and Meecrowave, you don't have to start it per class ;). Can require like 15 LOC but nothing we can't make :) More seriously what is nice with a rule is that it works in your IDE so it is way faster to start and dig into. What I hate with docker - and why I'd like to keep it off by default - is that it is trivial to have it not working cause of a version conflict due to the default version you have in your path. > Plus I know the author, so if any problems arise... ;) > The goal of all this junit4/docker changes is to make it easier to run > unit tests. > > > LieGrue,strub > On Tuesday, 23 October 2018, 08:27:59 CEST, Francesco Chicchiriccò < > ilgro...@apache.org> wrote: > > On 22/10/18 20:38, Mark Struberg wrote: > > Hi folks! > > Today I started playing with a maven profile to start various databases > via Docker.The idea is to be able to start and stop various databases from > the commandline or via jenkins.Had a chat with Francesco and he pointed me > to how they do it in Syncope. Was a good start. > > Since most of our tests are unit test and not ITs I think it's for now > better to have to start the databases manually, then do the test and stop > it again. We could also do this in a pre and post step in Jenkins.An > objections?Or should we just move forward and try it out.And later change > it if we find there is a better way? > > +1 to use Docker containers to support the various DBMSes. > > I have personally found io.fabric8:docker-maven-plugin very flexible and > useful, especially when used together with maven-failsafe-plugin, e.g. > with integration tests. > > With maven-surefire-plugin, instead, it is not clear if there is a way > to clean up afterwards, when one or more tests are failing. > > I am aware there are also other approaches (as [1] for example), but > never tried. > > Regards. > > [1] https://github.com/palantir/docker-compose-rule > > -- > Francesco Chicchiriccò > > Tirasa - Open Source Excellence > http://www.tirasa.net/ > > Member at The Apache Software Foundation > Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail > http://home.apache.org/~ilgrosso/ > >