[ https://issues.apache.org/jira/browse/CASSANDRA-13231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Brown updated CASSANDRA-13231: ------------------------------------ Resolution: Fixed Fix Version/s: 4.0 3.11.0 3.0.12 2.2.10 Reproduced In: 2.2.9, 4.x (was: 4.x) Status: Resolved (was: Patch Available) committed as sha {{44fefeffa53cf95223c4c7b6f79afaafe9b93e2e}} to 2.2, 3.0, 3.11, and trunk. Thanks! > 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 > Fix For: 2.2.10, 3.0.12, 3.11.0, 4.0 > > 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)