Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Fixed test where cleanup actually did not happen.
Browse files Browse the repository at this point in the history
As we intentionally induced an exception. Cleanup
put into finally block.
  • Loading branch information
cstamas committed Apr 18, 2013
1 parent 3359cbc commit ef5b56c
Showing 1 changed file with 10 additions and 5 deletions.
Expand Up @@ -109,11 +109,16 @@ public void successfulUploadWithAttributeAndDescribeOfParentDirectory()
final File toDeploy = testData().resolveFile( "artifacts/" + AOP_POM );
content().upload( location, toDeploy );

// this should throw IAEx as we are targeting a directory
content().getFileAttributes( repositoryLocation( "releases", AOP_POM_PARENT ) );

// need to clean up as this IT uses per-class Nexus instance
content().delete( location );
try
{
// this should throw IAEx as we are targeting a directory
content().getFileAttributes( repositoryLocation( "releases", AOP_POM_PARENT ) );
}
finally
{
// need to clean up as this IT uses per-class Nexus instance
content().delete( location );
}
}

@Test( expected = NexusClientNotFoundException.class )
Expand Down

0 comments on commit ef5b56c

Please sign in to comment.