Github user spmallette commented on a diff in the pull request:

    https://github.com/apache/incubator-tinkerpop/pull/282#discussion_r57703780
  
    --- Diff: 
hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/computer/AbstractHadoopGraphComputerTest.java
 ---
    @@ -0,0 +1,81 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +
    +package org.apache.tinkerpop.gremlin.hadoop.process.computer;
    +
    +import org.apache.hadoop.conf.Configuration;
    +import org.apache.hadoop.fs.FileSystem;
    +import org.apache.hadoop.fs.Path;
    +import org.apache.tinkerpop.gremlin.util.Gremlin;
    +import org.junit.Test;
    +
    +import java.io.File;
    +import java.util.stream.Stream;
    +
    +import static org.junit.Assert.assertEquals;
    +import static org.junit.Assert.assertFalse;
    +import static org.junit.Assert.assertTrue;
    +
    +/**
    + * @author Marko A. Rodriguez (http://markorodriguez.com)
    + */
    +public class AbstractHadoopGraphComputerTest {
    +
    +    @Test
    +    public void shouldCopyDirectoriesCorrectly() throws Exception {
    +        final FileSystem fs = FileSystem.get(new Configuration());
    +        if (!new File(System.getProperty("java.io.tmpdir") + 
"/tmp").exists())
    +            assertTrue(new File(System.getProperty("java.io.tmpdir") + 
"/tmp").mkdir());
    +        File tempFile1 = new File(System.getProperty("java.io.tmpdir") + 
"/tmp/test1.txt");
    +        File tempFile2 = new File(System.getProperty("java.io.tmpdir") + 
"/tmp/test2.txt");
    +        assertTrue(tempFile1.createNewFile());
    +        assertTrue(tempFile2.createNewFile());
    +        assertTrue(tempFile1.exists());
    +        assertTrue(tempFile2.exists());
    +        if (fs.exists(new Path("target/testing")))
    --- End diff --
    
    Please use `TestHelper.makeTestDataPath`. It places test data under 
standard "test data" directories in `/target` which basically creates a path 
like: `/target/TestClassName/`. This helps avoid naming collisions and makes it 
really easy to find test data files in the event of failures.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to