[
https://issues.apache.org/jira/browse/HADOOP-9199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13786325#comment-13786325
]
Robert Parker commented on HADOOP-9199:
---------------------------------------
[~aklochkov] mvn test -Dtest=TestMapFile; mvn test -Dtest=TestMapFile shows the
that TestMapFile is not quite cleaning up. Additionally the '/' is missing
between the "test.build.data" dir and the test file name.
{code}
Running org.apache.hadoop.io.TestMapFile
Tests run: 20, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 4.362 sec <<<
FAILURE! - in org.apache.hadoop.io.TestMapFile
testRenameWithFalse(org.apache.hadoop.io.TestMapFile) Time elapsed: 2.37 sec
<<< FAILURE!
junit.framework.AssertionFailedError: testRenameWithFalse invalid
IOExceptionMessage error !!!
at junit.framework.Assert.fail(Assert.java:50)
at junit.framework.Assert.assertTrue(Assert.java:20)
at
org.apache.hadoop.io.TestMapFile.testRenameWithFalse(TestMapFile.java:255)
testRename(org.apache.hadoop.io.TestMapFile) Time elapsed: 0.04 sec <<<
FAILURE!
junit.framework.AssertionFailedError: testRename error java.io.IOException:
Target
/home/rparker/Y/hadoop-gitdev/hadoop-common-project/hadoop-common/target/test/datatest-new.mapfile/datatest-old.mapfile
is a directory
at junit.framework.Assert.fail(Assert.java:50)
at org.apache.hadoop.io.TestMapFile.testRename(TestMapFile.java:199)
testRenameWithException(org.apache.hadoop.io.TestMapFile) Time elapsed: 0.037
sec <<< FAILURE!
junit.framework.ComparisonFailure: testRenameWithException invalid
IOExceptionMessage !!! expected:<[Target
/home/rparker/Y/hadoop-gitdev/hadoop-common-project/hadoop-common/target/test/datatest-new.mapfile/datatest-old.mapfile
is a directory]> but was:<[Can't rename file]>
at junit.framework.Assert.assertEquals(Assert.java:85)
at
org.apache.hadoop.io.TestMapFile.testRenameWithException(TestMapFile.java:229)
Results :
Failed tests:
TestMapFile.testRenameWithFalse:255 testRenameWithFalse invalid
IOExceptionMessage error !!!
TestMapFile.testRename:199 testRename error java.io.IOException: Target
/home/rparker/Y/hadoop-gitdev/hadoop-common-project/hadoop-common/target/test/datatest-new.mapfile/datatest-old.mapfile
is a directory
TestMapFile.testRenameWithException:229 testRenameWithException invalid
IOExceptionMessage !!! expected:<[Target
/home/rparker/Y/hadoop-gitdev/hadoop-common-project/hadoop-common/target/test/datatest-new.mapfile/datatest-old.mapfile
is a directory]> but was:<[Can't rename file]>
Tests run: 20, Failures: 3, Errors: 0, Skipped: 0
{code}
The '/' is missing in several other tests (TestArrayFile,TestBloomMapFile),. I
used to notice the difference between TestSetFile (which is correct) and
TestMapFile
{code}
grep test.build.data
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestArrayFile.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestArrayWritable.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestBloomMapFile.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestBooleanWritable.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestBytesWritable.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestEnumSetWritable.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestMapFile.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestSetFile.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestText.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestCompressedWritable.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestMultipleIOException.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestNullWritable.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestOutputBuffer.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestTwoDArrayWritable.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestVLongWritable.java
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/TestWritableComparator.java
{code}
Thanks for correcting the >80 lines and please remove the tabs. Sorry I missed
these items on the first review.
> Cover package org.apache.hadoop.io with unit tests
> --------------------------------------------------
>
> Key: HADOOP-9199
> URL: https://issues.apache.org/jira/browse/HADOOP-9199
> Project: Hadoop Common
> Issue Type: Test
> Affects Versions: 3.0.0, 2.0.3-alpha, 0.23.6
> Reporter: Vadim Bondarev
> Assignee: Andrey Klochkov
> Attachments: HADOOP-9199-branch-0.23-a.patch,
> HADOOP-9199-branch-0.23-b.patch, HADOOP-9199-branch-0.23-c.patch,
> HADOOP-9199-branch-0.23-e.patch, HADOOP-9199-branch-2-a.patch,
> HADOOP-9199-branch-2-b.patch, HADOOP-9199-branch-2-c.patch,
> HADOOP-9199-branch-2-e.patch, HADOOP-9199-trunk-a.patch,
> HADOOP-9199-trunk-b.patch, HADOOP-9199-trunk-c.patch,
> HADOOP-9199-trunk-e.patch, HADOOP-9199-trunk--n6.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.1#6144)