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
Better TestCase handling.
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
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
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 will appear after it is approved by moderators
 
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
 
Marko Rodriguez  
View profile  
 More options Jun 7 2012, 1:19 pm
From: Marko Rodriguez <okramma...@gmail.com>
Date: Thu, 7 Jun 2012 11:19:46 -0600
Local: Thurs, Jun 7 2012 1:19 pm
Subject: [Blueprints] Better TestCase handling.

Hi,

I read this:
        http://kozelka.net/blog/generating-temporary-files-in-junit-tests

And updated the JUnit tests in Blueprints so that target/test-data holds the databases and database files. This way, no more C:/temp or /tmp.

That one is for you Luca,
Marko.

http://markorodriguez.com


 
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.
Discussion subject changed to "[Blueprints] Better TestCase handling." by Luca Garulli
Luca Garulli  
View profile  
 More options Jun 7 2012, 2:33 pm
From: Luca Garulli <l.garu...@gmail.com>
Date: Thu, 7 Jun 2012 20:33:20 +0200
Local: Thurs, Jun 7 2012 2:33 pm
Subject: Re: [TinkerPop] [Blueprints] Better TestCase handling.

Hi,
have you changed the OrientDB test?

Lvc@

On 7 June 2012 19:19, Marko Rodriguez <okramma...@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.
Marko Rodriguez  
View profile  
 More options Jun 7 2012, 4:59 pm
From: Marko Rodriguez <okramma...@gmail.com>
Date: Thu, 7 Jun 2012 14:59:11 -0600
Local: Thurs, Jun 7 2012 4:59 pm
Subject: Re: [TinkerPop] [Blueprints] Better TestCase handling.

Yes. Stephen was saying that OrientGraphTest was acting weird on Windows.

Can you have a looksy, please? .... Its pretty basic what I did, just changed the directory to use target/ instead of temp/.

        https://github.com/tinkerpop/blueprints/blob/master/blueprints-orient...
        https://github.com/tinkerpop/blueprints/blob/master/blueprints-test/s...

Marko.

http://markorodriguez.com

On Jun 7, 2012, at 12:33 PM, Luca Garulli 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.
Joshua Shinavier  
View profile  
 More options Jun 7 2012, 5:18 pm
From: Joshua Shinavier <j...@fortytwo.net>
Date: Thu, 7 Jun 2012 17:18:45 -0400
Local: Thurs, Jun 7 2012 5:18 pm
Subject: Re: [TinkerPop] [Blueprints] Better TestCase handling.
Out of curiosity, what was the issue with temp files?  It was a little
awkward the way some of the tests were building the temp file
directory, but Java actually makes this pretty easy.  E.g. see
Neo4jGraphSailTest:

        File dir = File.createTempFile("blueprints", "-neo4j-test");
        String path = dir.getPath();
        dir.delete();
        dir.mkdir();

Josh


 
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.
Jeff Ramsdale  
View profile  
 More options Jun 7 2012, 5:34 pm
From: Jeff Ramsdale <jeff.ramsd...@gmail.com>
Date: Thu, 7 Jun 2012 14:34:21 -0700
Local: Thurs, Jun 7 2012 5:34 pm
Subject: Re: [TinkerPop] [Blueprints] Better TestCase handling.
It's not a big deal to do try/catch to clean up temp files/dirs in
case of exceptions, but it does add a bit of boilerplate code to a
test.

I liked the 8th comment on the initial blog post that points to JUnit
4.7+ and its support for auto-cleanup of temp resources:
http://weblogs.java.net/blog/johnsmart/archive/2009/09/29/working-tem...

Seems like that'd be the cleanest approach.

-jeff


 
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.
Alfredo Serafini  
View profile  
 More options Jun 7 2012, 7:58 pm
From: Alfredo Serafini <ser...@gmail.com>
Date: Thu, 7 Jun 2012 16:58:26 -0700 (PDT)
Local: Thurs, Jun 7 2012 7:58 pm
Subject: Re: [TinkerPop] [Blueprints] Better TestCase handling.

yes the cleanup by an annotated post (or sometimes pre, it depends)
condition it's more clear.
Please consider that dir.delete() does not always return immediatly what we
expected, especially on windows it sometimes has some delay, and this could
introduce some weird result in the test

this is another idea:
http://garygregory.wordpress.com/2010/01/20/junit-tip-use-rules-to-ma...

Il giorno giovedě 7 giugno 2012 23:34:21 UTC+2, Jeff Ramsdale ha scritto:


 
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.
End of messages
« Back to Discussions « Newer topic     Older topic »