These are chat archives for etorreborre/specs2

3rd
May 2018
Marko Dimjašević
@mdimjasevic
May 03 2018 08:58
@etorreborre , did something change in the order of execution between 3.8.x and 4.x?
Marko Dimjašević
@mdimjasevic
May 03 2018 09:08
I'm debugging a sequential spec that has a setup part first, but for some reason with that 4.2.0 release it doesn't execute anymore.
Marko Dimjašević
@mdimjasevic
May 03 2018 09:31
I see now that I'm ^-ing Fragments to a SpecStructure, which invokes structure.copy(lazyFragments = () => structure.fragments.append(others)). From the argument there, I'd assume there's some lazy evaluation, which might change the order of execution compared to before.
Eric Torreborre
@etorreborre
May 03 2018 09:41
This is possible. Generally we should avoid spec construction to be effectful
Marko Dimjašević
@mdimjasevic
May 03 2018 09:43
yeah, I'm fixing some spec that someone else wrote so I'm trying to figure out what's happening
how do I make sure things happen sequentially? I see that there is sequential ^ from SpecStructure, but it ain't seem to work
I have this in my is: override def is: SpecStructure = sequential ^ setupTest ^ someFragments, where setupTest is of type SpecStructure.
Marko Dimjašević
@mdimjasevic
May 03 2018 09:49
someFragments is of type Fragments
Eric Torreborre
@etorreborre
May 03 2018 11:57
I am actually not sure of the behaviour if setupTest is a SpecStructure. Why does it have to be? Can’t it be just a simple step?
also if you can trim down everything to a reproducible test case I’ll be able to help you faster
Marko Dimjašević
@mdimjasevic
May 03 2018 12:16
Sorry, I wish I could easily share this, but it's a proprietary code base. It's a messy spec as it accesses a database, it uses vars...
I'll figure it out. I just have to figure out what tests actually are meant to do and then I'll be able to fix them
Eric Torreborre
@etorreborre
May 03 2018 12:24
Good luck Marko :-)
Marko Dimjašević
@mdimjasevic
May 03 2018 12:25
thanks!
Anyhow, as soon as I fix these bugs, I'll be looking forward to upgrading to specs2 4.2.0. The company has been holding back in upgrading from 3.8.6 because of these issues in that particular fragile test specification.
Eric Torreborre
@etorreborre
May 03 2018 12:35
I’ll do it later on tonight from my hotel if you want
Marko Dimjašević
@mdimjasevic
May 03 2018 12:35
no need to rush at cost of other things you have to do. Whenever you get time.
Eric Torreborre
@etorreborre
May 03 2018 12:36
My open-source motto is “if I can do it, I do it” (with a very lax definition of “can” :-))
Marko Dimjašević
@mdimjasevic
May 03 2018 12:37
;)
Eric Torreborre
@etorreborre
May 03 2018 19:28
@mdimjasevic and @/all I just published 4.2.0 with the latest ScalaCheck 1.14.0