Robin,
the database is deleted after each run in Neo4jTestCase.java,
@Override
@After
protected void tearDown() throws Exception {
shutdownDatabase(true);
super.tearDown();
}
if you change to shutdownDatabase(false), the database will not be
deleted. In this case, make sure to run just that test in order not to
write several tests to the same DB for clarity.
mvn test -Dtest=TestDynamicLayers
Does that work for you?
Cheers,
/peter neubauer
GTalk: neubauer.peter
Skype peter.neubauer
Phone +46 704 106975
LinkedIn http://www.linkedin.com/in/neubauer
Twitter http://twitter.com/peterneubauer
http://www.neo4j.org - Your high performance graph database.
http://startupbootcamp.org/ - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
On Tue, Jul 5, 2011 at 6:07 PM, Robin Cura <[email protected]> wrote:
> Hello,
>
> First of all, I don't know anything in java, and I'm trying to figure out if
> neo4j could be usefull for my projects. If it is, I will of course learn a
> bit of java so that I can use neo4j in a decent way for my needs.
>
> I'd like to use a neo4j spatial database together with GeoServer.
> For this, I'm following the tutorial here :
> http://wiki.neo4j.org/content/Neo4j_Spatial_in_GeoServer
> But this paragraph is blocking me :
> "
>
> - One option for the database location is a database created using the
> unit tests in Neo4j Spatial. The rest of this wiki assumes that you ran the
> TestDynamicLayers unit test which loads an OSM dataset for the city of Malmö
> in Sweden, and then creates a number of Dynamic Layers (or views) on this
> data, which we can publish in GeoServer.
> - If you do use the unit test for the sample database, then the location
> of the database will be in the target/var/neo4j-db directory of the Neo4j
> Source code.
>
> "
>
> My problem is I do not succeed keeping those neo4j spatial databases created
> with the tests : When I run TestDynamicLayers, it builds databases (in
> target/var/neo4j-db), but as soon as the database is successfully loaded, it
> deletes it and start importing another database, and so on.
>
> My poor understanding of java doesn't help a lot, I tried to edit the .java
> in Netbeans + Maven, but until then, it doesn't work, all the directories
> created during the tests are deleted when the test ends.
>
> Any idea how I could keep those databases ?
>
> Thanks,
>
> Robin
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user