Re: [scalatest-users] Errors FeatureSpec w/ actors in Maven ?

47 views
Skip to first unread message

Bill Venners

unread,
Oct 29, 2012, 5:24:23 PM10/29/12
to scalate...@googlegroups.com
Hi Jan,

Not obvious to me what the problem is at first blush. Can you post
more info about the failures you're getting? Perhaps some nice, tall
stacktraces?

Thanks.

Bill

On Mon, Oct 29, 2012 at 2:13 PM, Jan Goyvaerts <java.a...@gmail.com> wrote:
> A number of FeatureSpec using actors systematically fail when running with
> Maven's Surefire plugin. For example:
>
> @RunWith(classOf[JUnitRunner])
> class MySpec extends FeatureSpec with GivenWhenThen with BeforeAndAfterEach
> {
> ...
> }
>
> However they all succeed when run in Intellij. When actors are not used -
> everything is synchronous - then both ways succeed.
>
> Is there something to take into account for unit testing with actors ?
>
> --
> You received this message because you are subscribed to the Google
> Groups "scalatest-users" group.
> To post to this group, send email to scalate...@googlegroups.com
> To unsubscribe from this group, send email to
> scalatest-use...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/scalatest-users?hl=en
> ScalaTest itself, and documentation, is available here:
> http://www.artima.com/scalatest



--
Bill Venners
Artima, Inc.
http://www.artima.com

Jan Goyvaerts

unread,
Oct 30, 2012, 4:15:12 AM10/30/12
to scalate...@googlegroups.com
Hello Bill,

I've got no (visible ?) stack traces. I'll double check tonight.

I'll cook up an example. Out of which will appear it's probably me ... :-)

Btw, is there a Scala equivalent for SureFire ? Because the only reason for @Runwith is to allow Surefire to pick it up.

Regards,

Jan

Bill Venners

unread,
Oct 30, 2012, 6:52:26 AM10/30/12
to scalate...@googlegroups.com
Hi Jan,

Sorry I didn't mention this before. You may also want to try the
ScalaTest Maven Plugin:

http://www.scalatest.org/user_guide/using_the_scalatest_maven_plugin

Bill

Jan Goyvaerts

unread,
Nov 1, 2012, 4:36:26 PM11/1/12
to scalate...@googlegroups.com
Hello Bill,

It seems the origin of this problem is the IDE - Intellij 12 + Scala plugin. FSC does not kick in any more either. It is needed to do clean+install to refresh the byte code. Setting a scenario to ignored drives the thing crazy also. :-)

Anyway, when cleaning it all it works with SureFire. Using the plugin allows the annotation to be removed. Thanks for that !

On the console output I'm getting pre- and postfixes that are probably not intended. [32m [0m ...

[36mRun starting. Expected test count is: 31 [0m
[32mDiscoverySuite: [0m
[32mUnregisterSpec: [0m
[32mA listener should not be notified any more after unregistration [0m

On the referenced page isn't there a typo in the plugin dependency ?

<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>1.0-M2</version>

instead of

<groupId>org.scalatest</groupId>
<artifactId>maven-scalatest-plugin</artifactId>
<version>1.0-SNAPSHOT</version>

Regards,

Jan

Bill Venners

unread,
Nov 1, 2012, 5:13:52 PM11/1/12
to scalate...@googlegroups.com
Hi Jan,

On Thu, Nov 1, 2012 at 1:36 PM, Jan Goyvaerts <java.a...@gmail.com> wrote:
> Hello Bill,
>
> It seems the origin of this problem is the IDE - Intellij 12 + Scala plugin.
> FSC does not kick in any more either. It is needed to do clean+install to
> refresh the byte code. Setting a scenario to ignored drives the thing crazy
> also. :-)
>
You're not the first to try a pending scenario. I will likely delay
2.0 final yet again to squeeze in a pending scopes (e.g., scenarios)
feature because it will necessitate the addition of one more event
("ScopePending") to the event model. I will release a 2.0.M5 soon
which won't have this in it yet. Sorry to drag 2.0 out so long, but
each milestone release I try to make like a regular release in terms
of how documented and thoroughly tested it is. But there can be slight
breaks from one milestone to the next. Once 2.0.final is out, I want
to keep the API very stable as we did from 1.0 to now.

> Anyway, when cleaning it all it works with SureFire. Using the plugin allows
> the annotation to be removed. Thanks for that !
>
Yay.

> On the console output I'm getting pre- and postfixes that are probably not
> intended. [32m [0m ...
>
> [36mRun starting. Expected test count is: 31 [0m
> [32mDiscoverySuite: [0m
> [32mUnregisterSpec: [0m
> [32mA listener should not be notified any more after unregistration [0m
>
This is the ansi codes for color. You can remove them by adding a W to
your -o, as in -oW. W stands for without color.

> On the referenced page isn't there a typo in the plugin dependency ?
>
> <groupId>org.scalatest</groupId>
> <artifactId>scalatest-maven-plugin</artifactId>
> <version>1.0-M2</version>
>
I'll check into that.

Thanks.

Bill

Bill Venners

unread,
Nov 2, 2012, 2:00:38 PM11/2/12
to scalate...@googlegroups.com
Hi Jan,

Nevermind my comments about pending scenarios yesterday. I was
thinking of pending features. That's the one we're wanting to add if
possible.

Bill
Reply all
Reply to author
Forward
0 new messages