Multithreaded tests? The Conductor class?

97 views
Skip to first unread message

KajMagnus

unread,
Jun 14, 2011, 11:28:12 AM6/14/11
to specs-users
Hi,

Is there any Specs functionality for testing thread safe objects?

In Specs2 ?

***

Would you recommend that I use ScalaTest instead of Specs to test
thread safety?

***

A while ago there was a class
svn/trunk/src/main/scala/org/specs/matcher/concurrent/
Conductor.scala
in the SVN repo.

but it was removed (in SVN r1155). Do you know why?

SVN r1155 log message:
"removed the concurrent package" (okay, hmm, but why? :-) )

( http://code.google.com/p/specs/source/detail?r=1155 )


Kind regards, Magnus

etorreborre

unread,
Jun 14, 2011, 6:40:32 PM6/14/11
to specs...@googlegroups.com
Hi Magnus,

That code was originally provided by Josh Cough as a Scala port from the Java version. I tried to integrate it with specs at the time but that didn't work (specs design was not adapted to multi-threading). Bill Venners put in extra effort to make this work for ScalaTest and you can definitely use it with ScalaTest.

That being said, if you find this really useful for multi-thread testing and if I get the permission from Josh and Bill, I can try to integrate it to specs2.

Before that, maybe you could elaborate a bit on the kind of test you'd like to specify? Is the Conductor way of doing things exactly what you want?

Eric.

Kaj Magnus Lindberg

unread,
Jun 16, 2011, 4:27:28 PM6/16/11
to specs...@googlegroups.com
Hi Eric,

Thank you very much for your reply :-)

On Wed, Jun 15, 2011 at 12:40 AM, etorreborre <etorr...@gmail.com> wrote:
> Hi Magnus,
> That code was originally provided by Josh Cough as a Scala port from the
> Java version. I tried to integrate it with specs at the time but that didn't
> work (specs design was not adapted to multi-threading). Bill Venners put in
> extra effort to make this work for ScalaTest and you can definitely use it
> with ScalaTest.

Okay

> That being said, if you find this really useful for multi-thread testing and
> if I get the permission from Josh and Bill, I can try to integrate it to
> specs2.
> Before that, maybe you could elaborate a bit on the kind of test you'd like
> to specify? Is the Conductor way of doing things exactly what you want?
> Eric.

I don't know, actually.

I intended to do some load testing of my Data Access Object,
and thought perhaps there was some multithreading module in Specs I could use,
and started looking for some multi-thread testing module.
But I don't know how the multi-thread tests could work.
(I'm fairly new to Specs... and somewhat new to Scala too :-) )

(Right now I might as well create 100 threads and have them attack the DAO.
Later on, I will probably do more elaborate multithreaded testing of my app.)


Kind regards, Magnus

etorreborre

unread,
Jun 16, 2011, 7:13:27 PM6/16/11
to specs...@googlegroups.com
> Right now I might as well create 100 threads and have them attack the DAO.
Later on, I will probably do more elaborate multithreaded testing of my app.


Don't hesitate to come back with anything that you'd find interesting for a specs2 addition,

Thanks,

Eric.
Reply all
Reply to author
Forward
0 new messages