cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefania (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-9561) Lifecycle unit tests fail when run in parallel
Date Sat, 06 Jun 2015 05:35:00 GMT
Stefania created CASSANDRA-9561:
-----------------------------------

             Summary: Lifecycle unit tests fail when run in parallel
                 Key: CASSANDRA-9561
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9561
             Project: Cassandra
          Issue Type: Test
            Reporter: Stefania
            Assignee: Stefania


We had a new failure in TrackerTest:

http://cassci.datastax.com/view/trunk/job/trunk_testall/139/testReport/junit/org.apache.cassandra.db.lifecycle/TrackerTest/testDropSSTables/

{code}
14:02:05     [junit] Testcase: testSSTablesInBounds(org.apache.cassandra.db.lifecycle.ViewTest):
FAILED
14:02:05     [junit] 0(true) 1(false) expected:<1> but was:<2>
14:02:05     [junit] junit.framework.AssertionFailedError: 0(true) 1(false) expected:<1>
but was:<2>
14:02:05     [junit] 	at org.apache.cassandra.db.lifecycle.ViewTest.testSSTablesInBounds(ViewTest.java:65)
14:02:05     [junit] 
14:02:05     [junit] 
14:02:05     [junit] Tests run: 7, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.58
sec
14:02:05     [junit] 
14:02:05     [junit] ------------- Standard Output ---------------
14:02:05     [junit] ERROR 13:57:36 Unable to delete /tmp/la-1-big-Data.db (it will be removed
on server restart; we'll also retry after GC)
14:02:05     [junit] ERROR 13:57:36 Unable to delete /tmp/la-1-big-Data.db (it will be removed
on server restart; we'll also retry after GC)
14:02:05     [junit] ERROR 13:57:36 Unable to delete /tmp/la-2-big-Data.db (it will be removed
on server restart; we'll also retry after GC)
14:02:05     [junit] ERROR 13:57:36 Unable to delete /tmp/la-2-big-Data.db (it will be removed
on server restart; we'll also retry after GC)
14:02:05     [junit] ERROR 13:57:36 Unable to delete /tmp/la-0-big-Data.db (it will be removed
on server restart; we'll also retry after GC)
14:02:05     [junit] ERROR 13:57:36 Unable to delete /tmp/la-0-big-Data.db (it will be removed
on server restart; we'll also retry after GC)
14:02:05     [junit] ------------- ---------------- ---------------
14:02:05     [junit] Testcase: testDropSSTables(org.apache.cassandra.db.lifecycle.TrackerTest):
FAILED
14:02:05     [junit] expected:<9> but was:<95>
14:02:05     [junit] junit.framework.AssertionFailedError: expected:<9> but was:<95>
14:02:05     [junit] 	at org.apache.cassandra.db.lifecycle.TrackerTest.testDropSSTables(TrackerTest.java:217)
14:02:05     [junit] 	at org.apache.cassandra.db.lifecycle.TrackerTest.testDropSSTables(TrackerTest.java:192)
{code}

I could reproduce it easily but *only if running the tests in parallel*:

{code}
ant test -Dtest.runners=4 -Dtest.name=lifecycle/*Test
{code}

If running with a single JVM then no failures can be detected, not even after 50 runs in a
loop.

I think the problem is a collision of file names for the sstables created by MockSchema. When
a JVM exits the file is deleted due to File.deleteOnExit(), and the test running in a different
JVM and using the same file name will fail. This is the only explanation I could think of.

I propose to place sstable files created by MockSchema in folders unique to each test by passing
a namespace to MockSchema, equal to the test name.

cc [~benedict]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message