[ https://issues.apache.org/jira/browse/CASSANDRA-13231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15895664#comment-15895664 ]
Jason Brown commented on CASSANDRA-13231: ----------------------------------------- As this is a change only to a unit test, not running the dtests: ||2.2||3.0||3.11||trunk|| |[branch|https://github.com/jasobrown/cassandra/tree/13231-2.2]|[branch|https://github.com/jasobrown/cassandra/tree/13231-3.0]|[branch|https://github.com/jasobrown/cassandra/tree/13231-3.11]|[branch|https://github.com/jasobrown/cassandra/tree/13231-trunk]| |[testall|http://cassci.datastax.com/view/Dev/view/jasobrown/job/jasobrown-13231-2.2-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/jasobrown/job/jasobrown-13231-3.0-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/jasobrown/job/jasobrown-13231-3.11-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/jasobrown/job/jasobrown-13231-trunk-testall/]| > org.apache.cassandra.db.DirectoriesTest(testStandardDirs) unit test failing > --------------------------------------------------------------------------- > > Key: CASSANDRA-13231 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13231 > Project: Cassandra > Issue Type: Bug > Reporter: Michael Kjellman > Assignee: Michael Kjellman > Attachments: 674.diff > > > The testStandardDirs(org.apache.cassandra.db.DirectoriesTest) unit test > always fails. This appears to be due to a commit by Yuki for CASSANDRA-10587 > which switched the SSTable descriptor to use the canonical path. > From one of Yuki's comments in CASSANDRA-10587: > "I ended up fixing Descriptor object to always have canonical path as its > directory. > This way we don't need to think about given directory is relative or absolute. > In fact, right now Desctiptor (and corresponding SSTable) is not considered > equal between Descriptor's directory being relative and absolute. (Added > simple unit test to DescriptorTest)." > The issue here is that canonical path will expand out differently than even > absolute path. In this case /var/folders -> /private/var/folders. The unit > test is looking for /var/folders/... but the Descriptor expands out to > /private/var/folders and the unit test fails. > Descriptor#L88 seems to be the real root cause. > [junit] Testcase: > testStandardDirs(org.apache.cassandra.db.DirectoriesTest): FAILED > [junit] > expected:</var/folders/fk/5j141flj5kbg_01sfvbwgckm0000gn/T/cassandra3608150262426920207unittest/ks/cf1-f5cce670f32311e689fe991a3af9a2eb/snapshots/42> > but > was:</private/var/folders/fk/5j141flj5kbg_01sfvbwgckm0000gn/T/cassandra3608150262426920207unittest/ks/cf1-f5cce670f32311e689fe991a3af9a2eb/snapshots/42> > [junit] junit.framework.AssertionFailedError: > expected:</var/folders/fk/5j141flj5kbg_01sfvbwgckm0000gn/T/cassandra3608150262426920207unittest/ks/cf1-f5cce670f32311e689fe991a3af9a2eb/snapshots/42> > but > was:</private/var/folders/fk/5j141flj5kbg_01sfvbwgckm0000gn/T/cassandra3608150262426920207unittest/ks/cf1-f5cce670f32311e689fe991a3af9a2eb/snapshots/42> > [junit] at > org.apache.cassandra.db.DirectoriesTest.testStandardDirs(DirectoriesTest.java:159) > [junit] > [junit] > [junit] Test org.apache.cassandra.db.DirectoriesTest FAILED > I'm guessing given we went to canonicalPath() on purpose the "fix" here is to > call .getCanonicalFile() on both expected Files generated (snapshotDir and > backupsDir) for the junit assert. -- This message was sent by Atlassian JIRA (v6.3.15#6346)