Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug that tinkerpop test suite can't find filter in resource directory #12

Merged
merged 1 commit into from
Aug 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions hugegraph-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@
<resources>
<resource>
<directory>src/main/resources/</directory>
<includes>
<include>hugegraph.properties</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
import com.baidu.hugegraph.structure.HugeFeatures;
import com.baidu.hugegraph.type.define.IdStrategy;

@Graph.OptIn("com.baidu.hugegraph.tinkerpop.StructureStandardTest")
@Graph.OptIn("com.baidu.hugegraph.tinkerpop.ProcessStandardTest")
@Graph.OptIn("com.baidu.hugegraph.tinkerpop.StructurePerformanceTest")
@Graph.OptIn("com.baidu.hugegraph.tinkerpop.ProcessPerformanceTest")
@Graph.OptIn("com.baidu.hugegraph.tinkerpop.StructureBasicSuite")
@Graph.OptIn("com.baidu.hugegraph.tinkerpop.ProcessBasicSuite")
@Graph.OptIn("com.baidu.hugegraph.tinkerpop.StructurePerformanceSuite")
@Graph.OptIn("com.baidu.hugegraph.tinkerpop.ProcessPerformanceSuite")
public class TestGraph implements Graph {

public static final String DEFAULT_VL = "vertex";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.URL;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
Expand Down Expand Up @@ -95,9 +96,12 @@ private void initBlackList() throws IOException {
filter = DEFAULT_FILTER;
}

String blackList = TestGraphProvider.class.getClassLoader()
.getResource(filter).getPath();
File file = new File(blackList);
URL blackList = TestGraphProvider.class.getClassLoader()
.getResource(filter);
E.checkArgument(blackList != null,
"Can't find tests filter '%s' in resource directory",
filter);
File file = new File(blackList.getPath());
E.checkArgument(
file.exists() && file.isFile() && file.canRead(),
"Need to specify a readable filter file rather than: %s",
Expand Down
4 changes: 2 additions & 2 deletions hugegraph-test/src/main/resources/hugegraph.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ serializer=${serializer}

store=hugegraph

vertex.tx_capacity=1000
edge.tx_capacity=1000
vertex.tx_capacity=10000
edge.tx_capacity=10000

# cassandra backend config
cassandra.host=127.0.0.1
Expand Down