Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed test where cleanup actually did not happen.

As we intentionally induced an exception. Cleanup
put into finally block.
  • Loading branch information...
commit ef5b56cb3d27477685c140fa5c173cc80d4a4c9d 1 parent 3359cbc
@cstamas cstamas authored
View
15 nexus-client-core-testsuite/src/test/java/org/sonatype/nexus/client/testsuite/ContentIT.java
@@ -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 )
Please sign in to comment.
Something went wrong with that request. Please try again.