Skip to content
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
2 changes: 1 addition & 1 deletion cpp/benchmarks/benchmark_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ GAR_NAMESPACE::Status GetTestResourceRoot(std::string* out) {
"Test resources not found, set GAR_TEST_DATA to <repo root>/testing");
}
// FIXME(@acezen): This is a hack to get around the fact that the testing
*out = std::string(c_root) + "/new";
*out = std::string(c_root);
return GAR_NAMESPACE::Status::OK();
}

Expand Down
3 changes: 1 addition & 2 deletions cpp/examples/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@
#define DASSERT(x)
#endif

// FIXME(@acezen): This is a hack to get around the fact that the testing
static const std::string TEST_DATA_DIR = // NOLINT
std::filesystem::path(__FILE__)
.parent_path()
.parent_path()
.parent_path()
.parent_path()
.string() +
"/testing/new";
"/testing";

#endif // CPP_EXAMPLES_CONFIG_H_
3 changes: 1 addition & 2 deletions cpp/test/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ GAR_NAMESPACE::Status GetTestResourceRoot(std::string* out) {
return GAR_NAMESPACE::Status::IOError(
"Test resources not found, set GAR_TEST_DATA to <repo root>/testing");
}
// FIXME(@acezen): This is a hack to get around the fact that the testing
*out = std::string(c_root) + "/new";
*out = std::string(c_root);
return GAR_NAMESPACE::Status::OK();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.junit.Test;

public class GraphInfoTest {
public static final String root = System.getenv("GAR_TEST_DATA");
public static final String root = System.getenv("GAR_TEST_DATA") + "/java";

@Test
public void test1() {
Expand Down
2 changes: 1 addition & 1 deletion pyspark/tests/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
def test_transform(spark):
initialize(spark)
source_path = (
GRAPHAR_TESTS_EXAMPLES.joinpath("new/ldbc_sample/parquet/ldbc_sample.graph.yml")
GRAPHAR_TESTS_EXAMPLES.joinpath("ldbc_sample/parquet/ldbc_sample.graph.yml")
.absolute()
.__str__()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ComputeExampleSuite extends AnyFunSuite {

test("run cc using graphx") {
// read vertex DataFrame
val file_path = "gar-test/new/ldbc_sample/parquet/"
val file_path = "gar-test/ldbc_sample/parquet/"
val prefix = getClass.getClassLoader.getResource(file_path).getPath
val vertex_yaml = getClass.getClassLoader
.getResource(file_path + "person.vertex.yml")
Expand Down
6 changes: 3 additions & 3 deletions spark/src/test/scala/com/alibaba/graphar/TestGraphInfo.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ class GraphInfoSuite extends AnyFunSuite {
test("load graph info") {
// read graph yaml
val yaml_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/csv/ldbc_sample.graph.yml")
.getResource("gar-test/ldbc_sample/csv/ldbc_sample.graph.yml")
.getPath
val prefix =
getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/csv/")
.getResource("gar-test/ldbc_sample/csv/")
.getPath
val graph_info = GraphInfo.loadGraphInfo(yaml_path, spark)

Expand Down Expand Up @@ -127,7 +127,7 @@ class GraphInfoSuite extends AnyFunSuite {

test("load edge info") {
val yaml_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/csv/person_knows_person.edge.yml")
.getResource("gar-test/ldbc_sample/csv/person_knows_person.edge.yml")
.getPath
val edge_info = EdgeInfo.loadEdgeInfo(yaml_path, spark)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TestGraphReaderSuite extends AnyFunSuite {
test("read graphs by yaml paths") {
// conduct reading
val graph_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/parquet/ldbc_sample.graph.yml")
.getResource("gar-test/ldbc_sample/parquet/ldbc_sample.graph.yml")
.getPath
val vertex_edge_df_pair = GraphReader.read(graph_path, spark)
val vertex_dataframes = vertex_edge_df_pair._1
Expand All @@ -54,7 +54,7 @@ class TestGraphReaderSuite extends AnyFunSuite {
test("read graphs by graph infos") {
// load graph info
val path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/parquet/ldbc_sample.graph.yml")
.getResource("gar-test/ldbc_sample/parquet/ldbc_sample.graph.yml")
.getPath
val graph_info = GraphInfo.loadGraphInfo(path, spark)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TestGraphTransformerSuite extends AnyFunSuite {
test("transform graphs by yaml paths") {
// conduct transformation
val source_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/parquet/ldbc_sample.graph.yml")
.getResource("gar-test/ldbc_sample/parquet/ldbc_sample.graph.yml")
.getPath
val dest_path = getClass.getClassLoader
.getResource("gar-test/transformer/ldbc_sample.graph.yml")
Expand Down Expand Up @@ -71,7 +71,7 @@ class TestGraphTransformerSuite extends AnyFunSuite {
test("transform graphs by graph infos") {
// load source graph info
val source_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/parquet/ldbc_sample.graph.yml")
.getResource("gar-test/ldbc_sample/parquet/ldbc_sample.graph.yml")
.getPath
val source_graph_info = GraphInfo.loadGraphInfo(source_path, spark)

Expand Down
4 changes: 2 additions & 2 deletions spark/src/test/scala/com/alibaba/graphar/TestReader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ReaderSuite extends AnyFunSuite {

test("read vertex chunks") {
// construct the vertex information
val file_path = "gar-test/new/ldbc_sample/parquet/"
val file_path = "gar-test/ldbc_sample/parquet/"
val prefix = getClass.getClassLoader.getResource(file_path).getPath
val vertex_yaml = getClass.getClassLoader
.getResource(file_path + "person.vertex.yml")
Expand Down Expand Up @@ -210,7 +210,7 @@ class ReaderSuite extends AnyFunSuite {

test("read edge chunks") {
// construct the edge information
val file_path = "gar-test/new/ldbc_sample/csv/"
val file_path = "gar-test/ldbc_sample/csv/"
val prefix = getClass.getClassLoader.getResource(file_path).getPath
val edge_yaml = getClass.getClassLoader
.getResource(file_path + "person_knows_person.edge.yml")
Expand Down
8 changes: 4 additions & 4 deletions spark/src/test/scala/com/alibaba/graphar/TestWriter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class WriterSuite extends AnyFunSuite {

// read vertex yaml
val vertex_yaml_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/parquet/person.vertex.yml")
.getResource("gar-test/ldbc_sample/parquet/person.vertex.yml")
.getPath
val vertex_info = VertexInfo.loadVertexInfo(vertex_yaml_path, spark)

Expand Down Expand Up @@ -106,7 +106,7 @@ class WriterSuite extends AnyFunSuite {

// read edge yaml
val edge_yaml_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/csv/person_knows_person.edge.yml")
.getResource("gar-test/ldbc_sample/csv/person_knows_person.edge.yml")
.getPath
val edge_info = EdgeInfo.loadEdgeInfo(edge_yaml_path, spark)
val adj_list_type = AdjListType.ordered_by_source
Expand Down Expand Up @@ -245,13 +245,13 @@ class WriterSuite extends AnyFunSuite {

// read vertex yaml
val vertex_yaml_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/csv/person.vertex.yml")
.getResource("gar-test/ldbc_sample/csv/person.vertex.yml")
.getPath
val vertex_info = VertexInfo.loadVertexInfo(vertex_yaml_path, spark)

// read edge yaml
val edge_yaml_path = getClass.getClassLoader
.getResource("gar-test/new/ldbc_sample/csv/person_knows_person.edge.yml")
.getResource("gar-test/ldbc_sample/csv/person_knows_person.edge.yml")
.getPath
val edge_info = EdgeInfo.loadEdgeInfo(edge_yaml_path, spark)
val vertex_chunk_size = edge_info.getSrc_chunk_size()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TransformExampleSuite extends AnyFunSuite {

test("transform file type") {
// read from orc files
val file_path = "gar-test/new/ldbc_sample/orc/"
val file_path = "gar-test/ldbc_sample/orc/"
val prefix = getClass.getClassLoader.getResource(file_path).getPath
val vertex_yaml = getClass.getClassLoader
.getResource(file_path + "person.vertex.yml")
Expand All @@ -45,7 +45,7 @@ class TransformExampleSuite extends AnyFunSuite {
assert(vertex_df_with_index.count() == vertices_num)

// write to parquet files
val output_file_path = "gar-test/new/ldbc_sample/parquet/"
val output_file_path = "gar-test/ldbc_sample/parquet/"
val output_prefix: String = "/tmp/example/"
val output_vertex_yaml = getClass.getClassLoader
.getResource(output_file_path + "person.vertex.yml")
Expand All @@ -69,7 +69,7 @@ class TransformExampleSuite extends AnyFunSuite {
}

test("transform adjList type") {
val file_path = "gar-test/new/ldbc_sample/parquet/"
val file_path = "gar-test/ldbc_sample/parquet/"
val prefix = getClass.getClassLoader.getResource(file_path).getPath
// get vertex num
val vertex_yaml = getClass.getClassLoader
Expand Down
2 changes: 1 addition & 1 deletion testing