- A Concurrent Affair - http://www.concurrentaffair.org -

New ConcJUnit Annotations and Method Name Suffixes

I guess I should mention that I changed the ConcJUnit annotations (@Test) and method name suffixes (testFoo_NOJOIN) a little bit.

I had noticed that putting a _NOJOIN suffix on a test method or using a @Test(forceThreadJoin=false) annotation entirely disabled the test thread group. That’s not really what I wanted to happen, and even if it had been, it was badly named.

Instead of having this conflated behavior, I now have three different flags that can be set. The @Test annotation member has also been renamed.

_NOTHREADS or @Test(checkThreads=false)
Disables the test thread group; now ConcJUnit behaves like JUnit and ignores failures in threads other than the main thread.
_NOJOIN or @Test(checkJoin=false)
Disables the check if threads are still alive.
_NOLUCKY or @Test(checkLucky=false)
Disables the check if threads ended, but only due to lucky circumstances.

Setting checkThreads=false also disables the join and lucky checks; setting checkJoin=false also disables the lucky checks. These changes have been made in the 20091020 [1] release.

I should build Javadocs and include them in DrJava as well. The latest development release has the ConcJUnit 20091020 library that corresponds to JUnit 4.7, but the included API Javadoc is still JUnit 4.4. That is kind of messed up. (Update: Done.)

[2] [3]Share [4]
2 Comments (Open | Close)

2 Comments To "New ConcJUnit Annotations and Method Name Suffixes"

#1 Comment By Andy Malakov On November 8, 2009 @ 23:53

Hello Mathias,

What a great tool. I wish it will become a part of standard JUnit.


#2 Comment By Mathias On November 9, 2009 @ 10:50

Andy, thank you very much for your words of support and encouragement. I will contact the JUnit team again to inquire if we can integrate ConcJUnit into the standard distribution.