You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Michael Shuler (JIRA)" <ji...@apache.org> on 2014/10/17 00:11:34 UTC

[jira] [Commented] (CASSANDRA-7713) CommitLogTest failure causes cascading unit test failures

    [ https://issues.apache.org/jira/browse/CASSANDRA-7713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14174345#comment-14174345 ] 

Michael Shuler commented on CASSANDRA-7713:
-------------------------------------------

I tried adding an @After block to the test, which appears to not be run when timeout occurs..  :(
{noformat}
diff --git a/test/unit/org/apache/cassandra/db/CommitLogTest.java b/test/unit/org/apache/cassandra/db/CommitLogTest.java
index 1be29a6..f30d527 100644
--- a/test/unit/org/apache/cassandra/db/CommitLogTest.java
+++ b/test/unit/org/apache/cassandra/db/CommitLogTest.java
@@ -30,6 +30,7 @@ import java.util.zip.Checksum;
 import com.google.common.util.concurrent.Uninterruptibles;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.After;
 
 import org.apache.cassandra.SchemaLoader;
 import org.apache.cassandra.Util;
@@ -318,4 +319,12 @@ public class CommitLogTest extends SchemaLoader
         row = command.getRow(notDurableKs);
         Assert.assertEquals(null, row.cf);
     }
+
+    @After
+    public void resetCommitLogDir()
+    {
+        File commitDir = new File(DatabaseDescriptor.getCommitLogLocation());
+        commitDir.setWritable(true);
+        System.out.println("reset commitlogdir: " + commitDir);
+    }
 }
{noformat}

(System.out.println was just for debugging, and this is output during a successful run)

> CommitLogTest failure causes cascading unit test failures
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-7713
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7713
>             Project: Cassandra
>          Issue Type: Test
>            Reporter: Michael Shuler
>            Assignee: Bogdan Kanivets
>             Fix For: 2.0.11
>
>         Attachments: CommitLogTest.system.log.txt
>
>
> When CommitLogTest.testCommitFailurePolicy_stop fails or times out, {{commitDir.setWritable(true)}} is never reached, so the build/test/cassandra/commitlog directory is left without write permissions, causing cascading failure of all subsequent tests.



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