[ https://issues.apache.org/jira/browse/CASSANDRA-12496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15426979#comment-15426979 ]
Tom Petracca commented on CASSANDRA-12496: ------------------------------------------ I hit this on (and confirmed the fix against) 2.2.7, but the problem appears to still exist on trunk and the fix is trivial and cherry-picks nicely: https://github.com/tpetracca/cassandra/tree/trunk-CASSANDRA-12496 > DirectoriesTest.testStandardDirs() fails due to symlinks > -------------------------------------------------------- > > Key: CASSANDRA-12496 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12496 > Project: Cassandra > Issue Type: Test > Components: Testing > Reporter: Tom Petracca > Priority: Trivial > > org.apache.cassandra.io.sstable.Descriptor constructor calls > directory.getCanonicalFile() on the File directory passed to it. If this is > a symlink, then the assert in DirectoriesTest.testStandardDirs fails, because > the File we compare it against contains the symlink, not the canonical path, > and File.equals(File other) compares the abstract paths themselves (without > resolving symlinks). > {noformat} > Testcase: testStandardDirs(org.apache.cassandra.db.DirectoriesTest): FAILED > expected:</symlink/folders/l6/lj_2mw3d4x5_27h5pwfyq_0n080gbv/T/cassandra6830438037861972447unittest/ks/cf1-5c8be380656611e69b97e3dba734bc44/snapshots/42> > but > was:</canonical/folders/l6/lj_2mw3d4x5_27h5pwfyq_0n080gbv/T/cassandra6830438037861972447unittest/ks/cf1-5c8be380656611e69b97e3dba734bc44/snapshots/42> > junit.framework.AssertionFailedError: > expected:</symlink/folders/l6/lj_2mw3d4x5_27h5pwfyq_0n080gbv/T/cassandra6830438037861972447unittest/ks/cf1-5c8be380656611e69b97e3dba734bc44/snapshots/42> > but > was:</canonical/folders/l6/lj_2mw3d4x5_27h5pwfyq_0n080gbv/T/cassandra6830438037861972447unittest/ks/cf1-5c8be380656611e69b97e3dba734bc44/snapshots/42> > at > org.apache.cassandra.db.DirectoriesTest.testStandardDirs(DirectoriesTest.java:149) > {noformat} > where: > {noformat} > computer:dir user$ ls -al /symlink > lrwxr-xr-x@ 1 user group 11 Jun 21 16:34 /symlink -> canonical > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)