Future matcher await & Specs2 3.8.9+

14 views
Skip to first unread message

Cédric Chantepie

unread,
Aug 10, 2017, 5:16:33 PM8/10/17
to specs2-users
Hi,

I'm trying to upgrade the Specs2 dependency for the tests of the Acolyte project (e.g. DriverSpec).

I can upgrade successfully with no issue up to 3.8.8, but if I try a version between 3.8.9 and 3.9.4, I get concurrency issue about the Future matchers, even if for all these Future the result seen using .andThen is what's expected.

Moreover, if I add the sequential modifier to these mutable.Specification, everything is ok.

I guess there is something between 3.8.8 and 3.8.9 that requires to change the Future tests.

Would appreciate any hint.

Best regards

etorreborre

unread,
Aug 11, 2017, 2:59:55 AM8/11/17
to specs2-users
Hi Cédric,

The implementation of the concurrent execution in specs2 has changed a lot after 3.8.8 (1a9722d).

One thing you can try is:

class DriverSpec(implicit ee: ExecutionEnv) extends org.specs2.mutable.Specification ...

And remove the `implicit ee: EE => ` in all the tests. 

Then make sure you are on 3.9.4. The execution env that is passed to the specification should be one that is 
distinct from specs2's own execution env which might trigger concurrency issues.

E.

Cédric Chantepie

unread,
Aug 11, 2017, 6:53:54 AM8/11/17
to specs2-users
Thanks a lot Eric, works fine in this way, and generally thanks for Specs2.

Best regards
Reply all
Reply to author
Forward
0 new messages