|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, software |
| 13 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + * See the License for the specific language governing permissions and |
| 16 | + * limitations under the License. |
| 17 | + */ |
| 18 | + |
| 19 | +package org.gluster.test; |
| 20 | + |
| 21 | +import java.io.IOException; |
| 22 | + |
| 23 | +import org.apache.hadoop.fs.FileSystemContractBaseTest; |
| 24 | +import org.slf4j.LoggerFactory; |
| 25 | + |
| 26 | +/** |
| 27 | + * This is the full filesystem contract test -which requires the |
| 28 | + * Default config set up to point to a filesystem |
| 29 | + */ |
| 30 | +public class TestGlusterFileSystemContract |
| 31 | + extends FileSystemContractBaseTest { |
| 32 | + private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(TestGlusterFileSystemContract.class); |
| 33 | + |
| 34 | + @Override |
| 35 | + protected void setUp() throws Exception{ |
| 36 | + fs=GFSUtil.create(true); |
| 37 | + super.setUp(); |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * junit.framework.AssertionFailedError: Rename result expected:<false> but was:<true> |
| 42 | + */ |
| 43 | + @Override |
| 44 | + public void testRenameFileAsExistingFile() throws Exception{ |
| 45 | + super.testRenameFileAsExistingFile(); |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | + * java.lang.RuntimeException: org.apache.hadoop.util.Shell$ExitCodeException: chmod: cannot access `/tmp/gluster-test-mount-point/mount/test/hadoop/file/subdir': Not a directory |
| 50 | + */ |
| 51 | + @Override |
| 52 | + public void testMkdirsFailsForSubdirectoryOfExistingFile() throws Exception{ |
| 53 | + super.testMkdirsFailsForSubdirectoryOfExistingFile(); |
| 54 | + } |
| 55 | + |
| 56 | + /** |
| 57 | + * java.io.IOException: Stream closed. |
| 58 | + */ |
| 59 | + @Override |
| 60 | + public void testOutputStreamClosedTwice() throws IOException{ |
| 61 | + super.testOutputStreamClosedTwice(); |
| 62 | + } |
| 63 | + |
| 64 | + /** |
| 65 | + * junit.framework.AssertionFailedError: Rename result expected:<false> but was:<true> |
| 66 | + */ |
| 67 | + @Override |
| 68 | + public void testListStatusThrowsExceptionForNonExistentFile() throws Exception{ |
| 69 | + super.testListStatusThrowsExceptionForNonExistentFile(); |
| 70 | + } |
| 71 | + |
| 72 | + /** |
| 73 | + * junit.framework.AssertionFailedError: expected:<file://null/user/root> but was:</tmp/gluster-test-mount-point/mount> |
| 74 | + */ |
| 75 | + @Override |
| 76 | + public void testWorkingDirectory() throws Exception{ |
| 77 | + super.testWorkingDirectory(); |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * AssertionFailedError: null |
| 82 | + */ |
| 83 | + @Override |
| 84 | + public void testMkdirs() throws Exception{ |
| 85 | + super.testMkdirs(); |
| 86 | + } |
| 87 | + |
| 88 | + /** |
| 89 | + java.lang.NoSuchMethodError: org.apache.hadoop.fs.FileSystem.getStatus()Lorg/apache/hadoop/fs/FsStatus; |
| 90 | + */ |
| 91 | + @Override |
| 92 | + public void testFsStatus() throws Exception{ |
| 93 | + super.testFsStatus(); |
| 94 | + } |
| 95 | + |
| 96 | +} |
0 commit comments