hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Nauroth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12603) TestSymlinkLocalFSFileContext#testSetTimesSymlinkToDir occasionally fail
Date Sun, 29 Nov 2015 06:08:11 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-12603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15030814#comment-15030814

Chris Nauroth commented on HADOOP-12603:

These tests were introduced in HADOOP-12045.  I'm linking the issues.

The failure on Solaris is the same as the way it fails on Windows (if you remove the {{assumeTrue}}
that currently skips it on Windows).  The root cause in this case is lack of a native {{stat}}
implementation on the platform's Hadoop native library.  This then causes the {{FileStatus}}
to be populated with the atime from the target instead of the symlink.  For more details,
refer to this comment of mine from HADOOP-12045, where decided to skip these tests on Windows:


The tests are intended to check the capability introduced in HADOOP-12045: changing atime
on the local file system.  Removing the tests would leave us in a state where that enhancement
was no longer tested regularly.  However, it seems as though the mere act of checking status
of the symlink risks updating the atime, depending on timing.

Instead of removing the tests, I suggest that we relax the assertion so that instead of strict
equality, it checks that current atime is greater than or equal.  This would still serve the
intent of the test, which is to check that {{setTimes}} alters the target instead of the link.
 The previous line sets atime to 3000, which is way in the past, so we never expect to be
anytime near that in the link's atime.

> TestSymlinkLocalFSFileContext#testSetTimesSymlinkToDir occasionally fail
> ------------------------------------------------------------------------
>                 Key: HADOOP-12603
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12603
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>              Labels: solaris, windows
> I have observed this test failure a few times in the past. When it fails, the expected
access time (of the file link) is always 1000 less than the actual access time.
> Error Message
> {noformat}
> expected:<1448478654000> but was:<1448478655000>
> {noformat}
> Stacktrace
> {noformat}
> java.lang.AssertionError: expected:<1448478654000> but was:<1448478655000>
> 	at org.junit.Assert.fail(Assert.java:88)
> 	at org.junit.Assert.failNotEquals(Assert.java:743)
> 	at org.junit.Assert.assertEquals(Assert.java:118)
> 	at org.junit.Assert.assertEquals(Assert.java:555)
> 	at org.junit.Assert.assertEquals(Assert.java:542)
> 	at org.apache.hadoop.fs.SymlinkBaseTest.testSetTimesSymlinkToDir(SymlinkBaseTest.java:1391)
> 	at org.apache.hadoop.fs.TestSymlinkLocalFS.testSetTimesSymlinkToDir(TestSymlinkLocalFS.java:233)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
> {noformat}
> Standard Output
> {noformat}
> 2015-11-25 19:10:55,231 WARN  fs.FileUtil (FileUtil.java:symLink(813)) - Command 'ln
-s /testptch/hadoop/hadoop-common-project/hadoop-common/target/test/data/4/vae1ng5t75/test1/file
failed 1 with: ln: failed to create symbolic link '/testptch/hadoop/hadoop-common-project/hadoop-common/target/test/data/4/vae1ng5t75/test2/linkToFile':
No such file or directory
> 2015-11-25 19:10:56,212 WARN  fs.FileUtil (FileUtil.java:symLink(813)) - Command 'ln
-s /testptch/hadoop/hadoop-common-project/hadoop-common/target/test/data/4/vae1ng5t75/test1/file
failed 1 with: ln: failed to create symbolic link '/testptch/hadoop/hadoop-common-project/hadoop-common/target/test/data/4/vae1ng5t75/test1/linkToFile':
File exists
> {noformat}

This message was sent by Atlassian JIRA

View raw message