You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefania (JIRA)" <ji...@apache.org> on 2015/12/07 08:23:11 UTC

[jira] [Updated] (CASSANDRA-9561) Lifecycle unit tests fail when run in parallel

     [ https://issues.apache.org/jira/browse/CASSANDRA-9561?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefania updated CASSANDRA-9561:
--------------------------------
    Component/s: Testing
                 Local Write-Read Paths

> 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
>          Components: Local Write-Read Paths, Testing
>            Reporter: Stefania
>            Assignee: Stefania
>             Fix For: 2.2.0 rc1, 3.0 alpha 1
>
>
> 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 files are deleted due to File.deleteOnExit(), and a test running in a different JVM and using the same file names may 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)