hector-client/hector

Tests run: 286, Failures: 4, Errors: 1, Skipped: 2 :(

Opened this issue · 6 comments

I just downloaded the latest code, and I'm getting unpredictable failures during the maven test phase.

Results :

Failed tests:

Tests in error:

Tests run: 286, Failures: 4, Errors: 1, Skipped: 2

20:49:34,082  INFO CassandraDaemon:218 - Stop listening to thrift clients
20:49:34,087  INFO MessagingService:539 - Waiting for messaging service to quiesce
20:49:34,091  INFO MessagingService:695 - MessagingService shutting down server thread.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] hector ............................................ SUCCESS [2.394s]
[INFO] test .............................................. SUCCESS [4.998s]
[INFO] hector-core ....................................... FAILURE [4:42.328s]
[INFO] hector-object-mapper .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:52.176s
[INFO] Finished at: Sat Nov 03 20:49:34 EDT 2012
[INFO] Final Memory: 30M/335M
[INFO] ------------------------------------------------------------------------

Even worse, I can re-run this and get more, or less, failures. (I just re-run this and got Failures: 3, Errors: 1, Skipped: 2).

More directly, I'm working on pull request 544 to remove log4j as a dependency and I'm trying to get all tests to pass.

I'm gonna attach the surefire reports, but here is the quickie summary:

  • testSimpleSelect(me.prettyprint.cassandra.model.CqlQueryTest)
  • testQuerySingleSubColumnExtractSuper(me.prettyprint.cassandra.service.template.SuperCfTemplateTest)
  • testTimeUUIDWithClockResolution(me.prettyprint.cassandra.utils.TimeUUIDUtilsTest)

Any ideas? Thanks, guys!

You can download the surefire-reports as a 7z archive or as a ZIP archive

I think I figured out why this happens: Java 7 doesn't give a predictable order to Class.get*Methods(), which can break JUnit tests that depend on running in a certain order.

This affects those test classes that query and modify the database in different methods without cleaning, like CqlQueryTest and SuperCfTemplateTest.

I'm willing to fix up the tests. I see a few possible approaches:

  1. Update the tests to clean up their own data after each method (in a @After method in BaseEmbededServerSetupTest, for example)
  2. Make the test order explicit via mechanisms like a custom JUnit-runner as described at http://intellijava.blogspot.com/2012/05/junit-and-java-7.html

What approach would most likely be accepted?

I'm still having this issue. Any fix for this? Maybe switching to java 6?

It works for java 6. Sometime this weekend I can try to give java 7 a try
and see what test breaks.
On Jun 6, 2013 4:49 PM, "Paulo Ricardo Motta Gomes" <
notifications@github.com> wrote:

I'm still having this issue. Any fix for this? Maybe switching to java 6?


Reply to this email directly or view it on GitHubhttps://github.com//issues/546#issuecomment-19081507
.

This is the issue we are experiencing within current builds 1.1-5 a year on from when it was reported.
I am going to take this issue on tonight and see if I can get anywhere.
I suggest to take The-Alchemist's 1st proposal as IMHO cleaning up individual test output (or at least truncating the data) is good practice anyway.
I'll create a branch and hopefully get a pull request fired off soon.
Thanks
Lewis

SGTM - thanks again @lewismc