Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Clean-up within specs
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 39 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dnagir  
View profile  
 More options Dec 9 2011, 3:54 am
From: dnagir <dna...@gmail.com>
Date: Fri, 9 Dec 2011 00:54:35 -0800 (PST)
Local: Fri, Dec 9 2011 3:54 am
Subject: Clean-up within specs
Hi,

I wonder how can I clear the database before each spec?

At first I thought that I can wrap each spec within a transaction like
so:
https://github.com/andreasronge/neo4j/blob/master/spec/spec_helper.rb...

but roll it back.

But the problem is that the saved models within that transactions are
not traversable.

So that this is false:

User.create
User.count.should > 0

This is pretty unexpected to me.

So my question is how to clean-up the database before each test.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Dec 9 2011, 4:00 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Fri, 9 Dec 2011 10:00:54 +0100
Local: Fri, Dec 9 2011 4:00 am
Subject: Re: Clean-up within specs
Guys, there is the new ImpermanentGraphDatabase, that is fully
functional but operating on non-persistent RAM-backed FileChannels at
the lowest level. We use it for testing in Java land, I think it would
be very applicable here, too!

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

brew install neo4j && neo4j start
heroku addons:add neo4j


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Ronge  
View profile  
 More options Dec 9 2011, 4:11 am
From: Andreas Ronge <andreas.ro...@gmail.com>
Date: Fri, 9 Dec 2011 10:11:33 +0100
Local: Fri, Dec 9 2011 4:11 am
Subject: Re: Clean-up within specs
Does the ImpermanentGraphDatabase support transactions and lucene ?
Check this issue https://github.com/neo4j/community/issues/44
and the following workaround using multitenancy :

c.after(:each) do
      finish_tx
      Neo4j::Rails::Model.close_lucene_connections
      Neo4j::Transaction.run do
        Neo4j::Index::IndexerRegistry.delete_all_indexes
      end
      Neo4j::Transaction.run do
        Neo4j.threadlocal_ref_node = Neo4j::Node.new :name =>
"ref_#{$name_counter}"
        $name_counter += 1
      end
    end

from https://github.com/andreasronge/neo4j/blob/master/spec/spec_helper.rb

On Fri, Dec 9, 2011 at 10:00 AM, Peter Neubauer


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vivek Prahlad  
View profile  
 More options Dec 9 2011, 4:14 am
From: Vivek Prahlad <vivek.prah...@gmail.com>
Date: Fri, 9 Dec 2011 14:44:37 +0530
Local: Fri, Dec 9 2011 4:14 am
Subject: Re: Clean-up within specs

Hi,

You have a few choices for doing this. Unfortunately, Neo4j does not yet
support a 'clear' for deleting all the nodes in a database.

The options are:
- Manually delete all nodes in your after(:each) block
       Neo4j::Transaction.run do
        Neo4j._all_nodes.each { |n| n.del unless n.neo_id == 0 }
      end

- Exploit the multitenancy feature to create a new reference node before
each test, and then delete the entire database after(:all). We use this
approach with the neo4j.rb tests, our tests run in approximately a minute
on a Macbook pro. Please take a look at
https://github.com/andreasronge/neo4j/blob/master/spec/spec_helper.rb in
case you'd like more info. Here's a snippet that shows this approach

  RSpec.configure do |c|
    $name_counter = 0
    c.after(:each) do
      Neo4j::Rails::Model.close_lucene_connections
      Neo4j::Transaction do
       Neo4j::Index::IndexRegistry.delete_all_indexes
      end
      Neo4j::Transaction.run do
        Neo4j.threadlocal_ref_node = Neo4j::Node.new :name =>
"ref_#{$name_counter}"
        $name_counter += 1
      end
    end

    c.before(:all) do
      rm_db_storage unless Neo4j.running?
    end
    c.after(:all) do
      Neo4j.shutdown
      rm_db_storage
    end

  def rm_db_storage
    FileUtils.rm_rf Neo4j::Config[:storage_path]
    raise "Can't delete db" if File.exist?(Neo4j::Config[:storage_path])
  end

A gotcha with this approach is that multiple lucene files will be opened
(the multitenancy feature creates a fresh set of lucene indices per
tenant). The delete_all_indexes call has the side-effect of closing all
open lucene files. There's a patch that is now part of Neo4j (should
hopefully be released as part of 1.6) that takes care of this issue without
requiring this hack. Info about this patch here:
https://github.com/neo4j/community/pull/51#issuecomment-2442894

Peter, is the ImpermanentGraphDatabase part of Neo4j 1.5? If so, we can try
and add support for it so that it can be used for writing tests.

Hope this helps,

Vivek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vivek Prahlad  
View profile  
 More options Dec 9 2011, 4:16 am
From: Vivek Prahlad <vivek.prah...@gmail.com>
Date: Fri, 9 Dec 2011 14:46:02 +0530
Local: Fri, Dec 9 2011 4:16 am
Subject: Re: Clean-up within specs

Just saw that Andreas beat me to it :) - the second approach below is the
same as what he's suggested.

Vivek

On Fri, Dec 9, 2011 at 2:44 PM, Vivek Prahlad <vivek.prah...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Dec 9 2011, 4:41 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Fri, 9 Dec 2011 10:41:18 +0100
Local: Fri, Dec 9 2011 4:41 am
Subject: Re: Clean-up within specs
Yes,
the ImpermanentGDB supports lucene and everything - the memory backing
is implemented at the java.nio.filechannel level. VERY convenient :)

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

brew install neo4j && neo4j start
heroku addons:add neo4j


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 9 2011, 4:45 am
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Fri, 9 Dec 2011 20:45:06 +1100
Local: Fri, Dec 9 2011 4:45 am
Subject: Re: Clean-up within specs
On 09/12/2011, at 8:00 PM, Peter Neubauer wrote:

> Guys, there is the new ImpermanentGraphDatabase, that is fully
> functional but operating on non-persistent RAM-backed FileChannels at
> the lowest level. We use it for testing in Java land, I think it would
> be very applicable here, too!

That is exactly the perfect solution that I'm after.
In RDBMS world I use in-memory SQLite for that.

So we can just drop the database and create a new one before the test and it should be cheap and fast.
Sounds awesome.

But I'm a little bit lost how I can make use of it (sorry just starting with all this), especially with the issues outlined by Andreas.

Or maybe for now I need to clean it up as Vivek explained?

BTW, I would call the class Transient/Memory Database instead of Impermanent :-)

Cheers.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Ronge  
View profile  
 More options Dec 9 2011, 5:00 am
From: Andreas Ronge <andreas.ro...@gmail.com>
Date: Fri, 9 Dec 2011 11:00:22 +0100
Local: Fri, Dec 9 2011 5:00 am
Subject: Re: Clean-up within specs
Created an issue for that.

http://neo4j.lighthouseapp.com/projects/15548-neo4j/tickets/208-bette...

@Dmytrii - I'm thinking of moving the lighthouse issues to github,
since it looks like github now has support for crosslinking between
commits and issues and support for hash tags in commit messages to
open close issues etc..


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 9 2011, 5:53 am
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Fri, 9 Dec 2011 21:53:06 +1100
Local: Fri, Dec 9 2011 5:53 am
Subject: Re: Clean-up within specs
On 09/12/2011, at 9:00 PM, Andreas Ronge wrote:

Thanks for that.
Hope it won't take too much time to implement it.

Unfortunately I won't be able to contribute PRs.
Really have to switch the current app over. And that's the last chance I am giving to neo4j :)

> @Dmytrii - I'm thinking of moving the lighthouse issues to github,
> since it looks like github now has support for crosslinking between
> commits and issues and support for hash tags in commit messages to
> open close issues etc..

Way to go! But I still can't see the "Issues" section on the repo.
Also with that in mind you could have created the "cleanup specs" issue on the Github.

Cheers.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Dec 9 2011, 6:03 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Fri, 9 Dec 2011 12:03:15 +0100
Local: Fri, Dec 9 2011 6:03 am
Subject: Re: Clean-up within specs

The only thing I am missing now is commit logs referring to other repos
issues, and voting on issues. Otherwise, github is great.

/peter

Sent from my phone, please excuse typos and autocorrection.
On Dec 9, 2011 11:53 AM, "Dmytrii Nagirniak" <dna...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile   Translate to Translated (View Original)
 More options Dec 9 2011, 6:20 am
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Fri, 9 Dec 2011 22:20:18 +1100
Local: Fri, Dec 9 2011 6:20 am
Subject: Re: Clean-up within specs

On 09/12/2011, at 10:03 PM, Peter Neubauer wrote:

> The only thing I am missing now is commit logs referring to other repos issues, and voting on issues. Otherwise, github is great.

The voting is a bit controversial since Github REMOVED it :)
I guess it should be an issue with "+1 comments" and the number of currently existing issues.
Tags/milestones should also help with that.

As for referencing issues to other repos. I think you can do it: https://github.com/blog/967-github-secrets

Quote:
You can reference issues between repositories by mentioning user/repository#number in an issue.

Anyway, so what do I do with the spec cleanups for now?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter Neubauer  
View profile  
 More options Dec 9 2011, 6:32 am
From: Peter Neubauer <peter.neuba...@neotechnology.com>
Date: Fri, 9 Dec 2011 12:32:20 +0100
Local: Fri, Dec 9 2011 6:32 am
Subject: Re: Clean-up within specs

Wow thanks,
That is a life saver!

/peter

Sent from my phone, please excuse typos and autocorrection.
On Dec 9, 2011 12:20 PM, "Dmytrii Nagirniak" <dna...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vivek Prahlad  
View profile  
 More options Dec 9 2011, 6:33 am
From: Vivek Prahlad <vivek.prah...@gmail.com>
Date: Fri, 9 Dec 2011 17:03:05 +0530
Local: Fri, Dec 9 2011 6:33 am
Subject: Re: Clean-up within specs

For now, I'd suggest the approach both Andreas and me suggested. Getting in
the ImpermanentGraphDatabase will need a small amount of work, I think it
should be fairly easy to switch to it once it's there.

Thanks,
Vivek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 9 2011, 6:57 am
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Fri, 9 Dec 2011 22:57:53 +1100
Local: Fri, Dec 9 2011 6:57 am
Subject: Re: Clean-up within specs

Thank,

Done that. It works fairly well.
Passed my first set of specs :)

The first little win :)

Cheers.

On 09/12/2011, at 10:33 PM, Vivek Prahlad wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 13 2011, 8:43 pm
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Wed, 14 Dec 2011 12:43:02 +1100
Local: Tues, Dec 13 2011 8:43 pm
Subject: Re: Clean-up within specs

Another option would be to use memory disk for testing.
That should significantly increase the speed without any additional changes.

On 09/12/2011, at 10:57 PM, Dmytrii Nagirniak wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vivek Prahlad  
View profile  
 More options Dec 13 2011, 11:09 pm
From: Vivek Prahlad <vivek.prah...@gmail.com>
Date: Wed, 14 Dec 2011 09:39:47 +0530
Local: Tues, Dec 13 2011 11:09 pm
Subject: Re: Clean-up within specs

Yes, you're right. I actually forgot to mention that - we're using memory
disks on both the linux and mac platforms on my project and it does
significantly speed up the tests.

Vivek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 14 2011, 12:06 am
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Wed, 14 Dec 2011 16:06:26 +1100
Local: Wed, Dec 14 2011 12:06 am
Subject: Re: Clean-up within specs
On 14/12/2011, at 3:09 PM, Vivek Prahlad wrote:

> Yes, you're right. I actually forgot to mention that - we're using memory disks on both the linux and mac platforms on my project and it does significantly speed up the tests.

Well done!

I just can't get my hands on to that. Also want to avoid any huge setups and create the memory disk before all specs and the drop it at the end.

Do you mind to share your setup?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vivek Prahlad  
View profile  
 More options Dec 14 2011, 12:45 am
From: Vivek Prahlad <vivek.prah...@gmail.com>
Date: Wed, 14 Dec 2011 11:15:50 +0530
Local: Wed, Dec 14 2011 12:45 am
Subject: Re: Clean-up within specs

Sure:

*Linux*
You can create a RAM disk with 500MB like this: (the mount command needs to
be issued as root)
mkdir -p /tmp/neo4j_testing
mount -t tmpfs -o size=500M tmpfs /tmp/neo4j_testing

*Mac
*You can create a 550MB RAM disk like this:
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430`

This will create a RAM disk under /Volumes/ramdisk

For both of these, in your spec_helper, you'll have to change the Neo4j
config to use the RAM disk.

Neo4j::Config[:storage_path] = /path/to/ram/disk

You can use umount to unmount the ram disk on both platforms.

Cheers,
Vivek
On Wed, Dec 14, 2011 at 10:36 AM, Dmytrii Nagirniak <dna...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 14 2011, 1:47 am
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Wed, 14 Dec 2011 17:47:16 +1100
Local: Wed, Dec 14 2011 1:47 am
Subject: Re: Clean-up within specs

Thanks for that.

I guess I was curious if you mount the disk before each run and unmount at the end?
Or maybe you rely on a system being configured?.

On 14/12/2011, at 4:45 PM, Vivek Prahlad wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 14 2011, 11:41 pm
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Thu, 15 Dec 2011 15:41:06 +1100
Local: Wed, Dec 14 2011 11:41 pm
Subject: Re: Clean-up within specs

Unfortunately this approach doesn't work for Cucumber testing :(

It preserves indexes between the scenarios.
So every time I do "User.all" it returns the same objects that were created in the very first scenario!

How can I really make sure the DB is clear?

Here is my cleanup in Cucumber:

require 'fileutils'

# TODO: Remove dup: copy paste from the spec/support/neo4j.rb
def rm_db_storage!
  FileUtils.rm_rf Neo4j::Config[:storage_path]
  raise "Can't delete db" if File.exist?(Neo4j::Config[:storage_path])
end

rm_db_storage! unless Neo4j.running?

$spec_counter = Time.now.to_f
After do |s|
  Neo4j::Rails::Model.close_lucene_connections
  Neo4j::Transaction.run do
    Neo4j::Index::IndexerRegistry.delete_all_indexes
  end
  Neo4j::Transaction.run do
    Neo4j.threadlocal_ref_node = Neo4j::Node.new :name => "ref_#{$spec_counter}"
    $spec_counter += 1
  end
end

On 09/12/2011, at 10:57 PM, Dmytrii Nagirniak wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 15 2011, 10:13 pm
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Fri, 16 Dec 2011 14:13:10 +1100
Local: Thurs, Dec 15 2011 10:13 pm
Subject: Re: Clean-up within specs

Anybody??

On 15/12/2011, at 3:41 PM, Dmytrii Nagirniak wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vivek Prahlad  
View profile  
 More options Dec 15 2011, 11:06 pm
From: Vivek Prahlad <vivek.prah...@gmail.com>
Date: Fri, 16 Dec 2011 09:36:14 +0530
Local: Thurs, Dec 15 2011 11:06 pm
Subject: Re: Clean-up within specs

You may need to do a User.destroy_all after each test as a workaround.
Otherwise, you'll have to delete all the nodes in your database like I'd
suggested in an earlier thread. The 'all' call doesn't use the lucene index
AFAIK, it uses traversals.

Is your user model shared across tenants (ie, does it have a

ref_node {Neo4j.default_ref_node}

declaration anywhere?

Vivek

On Thu, Dec 15, 2011 at 10:11 AM, Dmytrii Nagirniak <dna...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 15 2011, 11:21 pm
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Fri, 16 Dec 2011 15:21:18 +1100
Local: Thurs, Dec 15 2011 11:21 pm
Subject: Re: Clean-up within specs

On 16/12/2011, at 3:06 PM, Vivek Prahlad wrote:

> You may need to do a User.destroy_all after each test as a workaround. Otherwise, you'll have to delete all the nodes in your database like I'd suggested in an earlier thread. The 'all' call doesn't use the lucene index AFAIK, it uses traversals.

I am kind of lost here.
At the end of each spec I swap out ref_node which loses all the references to existing nodes.
So "User.all" should not return anything, especially if it's using traversals.
I don't understand how come it still does?

> Is your user model shared across tenants (ie, does it have a

> ref_node {Neo4j.default_ref_node}

> declaration anywhere?

Nope.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vivek Prahlad  
View profile  
 More options Dec 15 2011, 11:46 pm
From: Vivek Prahlad <vivek.prah...@gmail.com>
Date: Fri, 16 Dec 2011 10:16:34 +0530
Local: Thurs, Dec 15 2011 11:46 pm
Subject: Re: Clean-up within specs

Hard to say what exactly is going on without examining what's happening at
runtime. I've seen this kind of behaviour when top level transactions are
inadvertently created in tests / migrations. Is any of your before / after
stuff creating Neo4j transactions anywhere?

In your test, you could try asserting that the Neo4j threadlocal ref node
is the same as what was assigned in the before / after block? Are your user
objects created by the test, or as part of setup?

Could you try looking at the database using Neoclipse? You should not see
any user nodes attached to the home node.

Hope this helps,

Vivek


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dmytrii Nagirniak  
View profile  
 More options Dec 16 2011, 2:09 am
From: Dmytrii Nagirniak <dna...@gmail.com>
Date: Fri, 16 Dec 2011 18:09:27 +1100
Local: Fri, Dec 16 2011 2:09 am
Subject: Re: Clean-up within specs

On 16/12/2011, at 3:46 PM, Vivek Prahlad wrote:

> Hard to say what exactly is going on without examining what's happening at runtime. I've seen this kind of behaviour when top level transactions are inadvertently created in tests / migrations. Is any of your before / after stuff creating Neo4j transactions anywhere?

Yes, it's basically done the same is neo4j.rb does

The problem is that it work fine for RSpec, but not for Cucumber!

Anyway, here is my "features/support/ne4j.rb" file that is supposed to take care of the clean-up:

require 'fileutils'

# TODO: Remove dup: copy paste from the spec/support/neo4j.rb
def rm_db_storage!
  FileUtils.rm_rf Neo4j::Config[:storage_path]
  raise "Can't delete db" if File.exist?(Neo4j::Config[:storage_path])
end

rm_db_storage! unless Neo4j.running?

$spec_counter = Time.now.to_f
After do |s|
  Neo4j::Rails::Model.close_lucene_connections
  Neo4j::Transaction.run do
    Neo4j::Index::IndexerRegistry.delete_all_indexes
  end
  Neo4j::Transaction.run do
    Neo4j.threadlocal_ref_node = Neo4j::Node.new :name => "ref_#{$spec_counter}"
    $spec_counter += 1
  end
end

> In your test, you could try asserting that the Neo4j threadlocal ref node is the same as what was assigned in the before / after block?

ref_node is the same before tests, during tests and after. It only changes after the block above.

> Are your user objects created by the test, or as part of setup?

As part of the test. In Cucumber there is really no setup as such.

> Could you try looking at the database using Neoclipse? You should not see any user nodes attached to the home node.

That is not correct. The setup I showed you deletes the database in the beginning. At the end of each test the ref_node is replaced,

So the data will be left in the DB (and I can see it with Neoclipse).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 39   Newer >
« Back to Discussions « Newer topic     Older topic »