Changeset View
Changeset View
Standalone View
Standalone View
java/server/README.md
Show All 21 Lines | |||||
Default port is 5009 (use the `--port` option to change port number). If you | Default port is 5009 (use the `--port` option to change port number). If you | ||||
need timings metadata send back to the client in addition to the result, use the | need timings metadata send back to the client in addition to the result, use the | ||||
`--timings` flag. | `--timings` flag. | ||||
Tests | Tests | ||||
----- | ----- | ||||
Unit tests rely on test data that are already available in the Git repository | Unit tests rely on test data that are already available in the Git repository | ||||
(under `src/test/dataset/`). You generally only need to run them using Maven: | (under `src/swh/graph/tests/dataset/`). You generally only need to run them using Maven: | ||||
```bash | ```bash | ||||
$ mvn test | $ mvn test | ||||
``` | ``` | ||||
In case you want to regenerate the test data: | In case you want to regenerate the test data: | ||||
```bash | ```bash | ||||
# Graph compression | # Graph compression | ||||
$ cd src/test/dataset | $ cd src/swh/graph/tests/dataset | ||||
$ ./generate_graph.sh | $ ./generate_graph.sh | ||||
$ cd ../../../ | $ cd ../../../.. | ||||
$ mvn compile assembly:single | $ mvn compile assembly:single | ||||
# Dump mapping files | # Dump mapping files | ||||
$ java -cp target/swh-graph-jar-with-dependencies.jar \ | $ java -cp target/swh-graph-jar-with-dependencies.jar \ | ||||
org.softwareheritage.graph.backend.Setup \ | org.softwareheritage.graph.backend.Setup \ | ||||
src/test/dataset/example.nodes.csv.gz \ | src/swh/graph/tests/dataset/example.nodes.csv.gz \ | ||||
src/test/dataset/output/example | src/swh/graph/tests/dataset/output/example | ||||
``` | ``` |