threading-related unit test failures

2 views
Skip to first unread message

Marcus Better

unread,
Jul 31, 2009, 11:02:08 AM7/31/09
to testn...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I get sporadic threading-related failures in some unit tests when building TestNG 5.10 (or 5.9) on a dual-core Linux x86_64
machine with OpenJDK 6.

The errors occur in the DataProviderThreadPoolSizeTest class, methods shouldUseDefaultDataProviderThreadCount() and
shouldUseSpecifiedDataProviderThreadCount(), each with probability around 3% (measured by invoking each method separately 100
times).

Error messages seem to be the same every time:

java.lang.AssertionError: expected:<10> but was:<9>
at
test.thread.DataProviderThreadPoolSizeTest.shouldUseDefaultDataProviderThreadCount(DataProviderThreadPoolSizeTest.java:16)

java.lang.AssertionError: expected:<3> but was:<2>
at
test.thread.DataProviderThreadPoolSizeTest.shouldUseSpecifiedDataProviderThreadCount(DataProviderThreadPoolSizeTest.java:33)

Any idea what is going on here?

Cheers,

Marcus

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkpzB3AACgkQXjXn6TzcAQmNVgCeKZNYWLUWrBY1SOa6BqkslGFp
uLsAoJIqlC2oer+bnMRZ7O8f3Ck8oBGp
=58nl
-----END PGP SIGNATURE-----


Cédric Beust ♔

unread,
Jul 31, 2009, 12:51:12 PM7/31/09
to testn...@googlegroups.com
Odd.  It can definitely be a bug in the test itself, which I never noticed since I don't use OpenJDK.  I don't think I've ever seen these tests fail on Mac and Linux, with various Sun JDK's.

I'll take a closer look, thanks for the report!

--
Cédric

Reply all
Reply to author
Forward
0 new messages