Scaldi 0.5.7 with play 2.4 & slick 3 no down evolutions in tests with "withScaldiApp"

37 views
Skip to first unread message

Alexandre Bedrytski

unread,
Jun 13, 2015, 6:44:17 PM6/13/15
to sca...@googlegroups.com
Hello,

I'm trying to port my application from previous versions and this journey is without luck so far.

I have some problems with database evolutions, they should trigger around each spec in tests, but they don't. 
I surrounded each spec with "withScaldiApp" as you can see here https://github.com/Mironor/livrarium/blob/master/test/helpers/LivrariumSpecification.scala 

The UP evolution seems to work (but only once, in the beginning of the test instead of in the beginning of each spec), but the DOWN evolution doesn't work at all (as seen in H2's logs, no "drop" statements at all, only "create" ones)

As you may see, I used FakeApplication and Global to make it work (all the evolutions worked as expected), these two are kinda deprecated since the 2.4.

I don't know know if Guice solution works as the coupling with Scaldi is too tight right now (I will try it eventually if there is now other way to do it with Scaldi).

I've tried to solve this problem for quite some time and there is no help in the google what-so-ever (or the search terms I used weren't good enough), so I'm trying to get some help here.

Please advise if the problem is not with scaldi, but with slick or play itself, I'll try to ask the question on their mail groups.

Thanks,
Alex.


I attach the log from test execution in a file as it is too big to put it here.

Alexandre Bedrytski

unread,
Jun 13, 2015, 6:46:37 PM6/13/15
to sca...@googlegroups.com
Ok, file could not be attached, posted it on pastebin  http://pastebin.com/KwxRLVCJ

Alexandre Bedrytski

unread,
Jun 13, 2015, 6:56:11 PM6/13/15
to sca...@googlegroups.com
I forgot, the command to reproduce the problem is "sbt testOnly daos.LoginInfoDAOSpec"


On Sunday, June 14, 2015 at 12:44:17 AM UTC+2, Alexandre Bedrytski wrote:

Oleg Ilyenko

unread,
Jun 14, 2015, 3:21:17 PM6/14/15
to sca...@googlegroups.com, mean...@gmail.com
Hi Alexandre,

I looked into this issue and create a PR with small description of the changes :)


Cheers,
Oleg

Alexandre Bedrytski

unread,
Jun 14, 2015, 4:36:26 PM6/14/15
to sca...@googlegroups.com
Oh man, I hoped for some help, but 19 changed files in your pull request!

So far the evolutions work as they should, I'll see if there are some other things that I don't yet understand (as, so far, for some changes it was just trial&error as you could notice).

Anyway thanks a ton for your time with this pull request, your help is very much appreciated!
Reply all
Reply to author
Forward
0 new messages