[utilities COMMIT] in /spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource: FileBackedHTTPResour...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Feb 23 10:13:34 EST 2015
Author: rdw
Date: Mon Feb 23 10:13:34 2015
New Revision: 762
URL: http://svn.shibboleth.net/view/utilities?rev=762&view=rev
Log:
JSE-11 Clean up droppings left by badly constructed test.
Modified:
spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResourceTest.java
spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/HTTPResourceTest.java
Modified: spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResourceTest.java
URL: http://svn.shibboleth.net/view/utilities/spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResourceTest.java?rev=762&r1=761&r2=762&view=diff
==============================================================================
--- spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResourceTest.java (original)
+++ spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/FileBackedHTTPResourceTest.java Mon Feb 23 10:13:34 2015
@@ -27,6 +27,7 @@
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
import org.testng.Assert;
+import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
@@ -39,13 +40,19 @@
private final String nonExistsURL = "http://svn.shibboleth.net/view/utilities/spring-extensions/trunk/src/test/resources/data/documxent.xml?view=co";
private String existsFile;
-
private HttpClient client;
@BeforeClass public void setupClient() throws Exception {
client = (new HttpClientBuilder()).buildClient();
File file = File.createTempFile("FileBackedHTTPResourceTest1", ".xml");
existsFile = file.getAbsolutePath();
+ }
+
+ @AfterClass public void deleteFile() {
+ File f = new File(existsFile);
+ if (f.exists()) {
+ f.delete();
+ }
}
@Test public void existsTest() throws IOException {
Modified: spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/HTTPResourceTest.java
URL: http://svn.shibboleth.net/view/utilities/spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/HTTPResourceTest.java?rev=762&r1=761&r2=762&view=diff
==============================================================================
--- spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/HTTPResourceTest.java (original)
+++ spring-extensions/trunk/src/test/java/net/shibboleth/ext/spring/resource/HTTPResourceTest.java Mon Feb 23 10:13:34 2015
@@ -141,6 +141,7 @@
}
f.delete();
}
+ dir.delete();
}
@Test public void springLoadFileCache() throws IOException {
More information about the commits
mailing list