Re: [Neo4j] Run test and development DBs at same time

2011-10-09 Thread Steve Jalim
Thanks for the suggestions to try the ImpermanentGraphDatabase - I'd come
across that, but I forgot to mention in my email that I'm using Neo purely
via its REST API, so I don't think I can use that, can I? Or can I invoke an
IGD that runs in parallel with my dev datastore?

S



Date: Sat, 8 Oct 2011 13:27:54 -0700
 From: Andreas Kollegger andreas.kolleg...@neotechnology.com
 Subject: Re: [Neo4j] Run test and development DBs at same time
 To: Neo4j user discussions user@lists.neo4j.org
 Message-ID: ef337405-283a-49d6-825f-154e96c33...@neotechnology.com
 Content-Type: text/plain; charset=windows-1252

 Take a look at ImpermanentTestDatabse, available from the kernel-tests
 library.

 import org.neo4j.test.ImpermanentGraphDatabase;

 Maven dependency?

dependency
  groupIdorg.neo4j/groupId
  artifactIdneo4j-kernel/artifactId
  version${neo4j.version}/version
  classifiertests/classifier
/dependency

 Cheers,
 Andreas



___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Run test and development DBs at same time

2011-10-09 Thread Peter Neubauer
I would run 2 instances on different ports and clean the db via the
extension, or, if it is small data, and via a groovy or Gremlin script
accessing the Neo4j java API for cleaning, see
http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-send-an-arbitrary-groovy-script---lucene-sorting.
Would that work?

/peter

Sent from my phone.
On Oct 9, 2011 10:45 AM, Steve Jalim st...@somefantastic.co.uk wrote:

 Thanks for the suggestions to try the ImpermanentGraphDatabase - I'd come
 across that, but I forgot to mention in my email that I'm using Neo purely
 via its REST API, so I don't think I can use that, can I? Or can I invoke
 an
 IGD that runs in parallel with my dev datastore?

 S



 Date: Sat, 8 Oct 2011 13:27:54 -0700
  From: Andreas Kollegger andreas.kolleg...@neotechnology.com
  Subject: Re: [Neo4j] Run test and development DBs at same time
  To: Neo4j user discussions user@lists.neo4j.org
  Message-ID: ef337405-283a-49d6-825f-154e96c33...@neotechnology.com
  Content-Type: text/plain; charset=windows-1252
 
  Take a look at ImpermanentTestDatabse, available from the kernel-tests
  library.
 
  import org.neo4j.test.ImpermanentGraphDatabase;
 
  Maven dependency?
 
 dependency
   groupIdorg.neo4j/groupId
   artifactIdneo4j-kernel/artifactId
   version${neo4j.version}/version
   classifiertests/classifier
 /dependency
 
  Cheers,
  Andreas
 
 
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Run test and development DBs at same time

2011-10-08 Thread Andreas Kollegger
Take a look at ImpermanentTestDatabse, available from the kernel-tests library.

import org.neo4j.test.ImpermanentGraphDatabase;

Maven dependency…

dependency
  groupIdorg.neo4j/groupId
  artifactIdneo4j-kernel/artifactId
  version${neo4j.version}/version
  classifiertests/classifier
/dependency

Cheers,
Andreas
 
On Oct 8, 2011, at 1:19 PM, Steve Jalim wrote:

 Hi
 
 Is there a common pattern for test-driven development (or even just running
 unit tests) against a Neo DB without filling your development DB with test
 data?
 
 One solution I've thought might work is to run two Neo DBs, one in
 /path/to/my/sandboxed/dev/data and another in
 /path/to/my/sandboxed/test/data. However, looking at the conf files for neo,
 I can't see scope for that without some fiddling around -- am I missing
 something obvious?
 
 Cheers
 Steve
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Run test and development DBs at same time

2011-10-08 Thread Michael Hunger
You can use a import org.neo4j.test.ImpermanentGraphDatabase;

which uses a temporary directory and cleans its contents before startup.

It is contained in the neo4j-kernel-tests.jar.

dependency
groupIdorg.neo4j/groupId
artifactIdneo4j-kernel/artifactId
typetest-jar/type
scopetest/scope
/dependency

HTH

Michael

Am 08.10.2011 um 22:19 schrieb Steve Jalim:

 Hi
 
 Is there a common pattern for test-driven development (or even just running
 unit tests) against a Neo DB without filling your development DB with test
 data?
 
 One solution I've thought might work is to run two Neo DBs, one in
 /path/to/my/sandboxed/dev/data and another in
 /path/to/my/sandboxed/test/data. However, looking at the conf files for neo,
 I can't see scope for that without some fiddling around -- am I missing
 something obvious?
 
 Cheers
 Steve
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Run test and development DBs at same time

2011-10-08 Thread Javier de la Rosa
On Sat, Oct 8, 2011 at 16:30, Michael Hunger
michael.hun...@neotechnology.com wrote:
 You can use a import org.neo4j.test.ImpermanentGraphDatabase;

Do you know if it could be possible to use this from the REST server?



-- 
Javier de la Rosa
http://versae.es
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Run test and development DBs at same time

2011-10-08 Thread jadell
For development using the REST interface, I usually run two databases on
separate ports or hosts.  On the development/testing database, I use the
remote clean extension found at
https://github.com/jexp/neo4j-clean-remote-db-addon to reset the database
before running my automated tests.

-- Josh Adell


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-Run-test-and-development-DBs-at-same-time-tp3405951p3406525.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user