Author: rwesten
Date: Wed May 6 12:45:07 2015
New Revision: 1677978
URL: http://svn.apache.org/r1677978
Log:
minor: The Entityhub integration test now closes the Zip archive providing the
DOAP files used to test the Entityhub endpoint
Modified:
stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/entityhub/it/EntityhubTest.java
Modified:
stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/entityhub/it/EntityhubTest.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/entityhub/it/EntityhubTest.java?rev=1677978&r1=1677977&r2=1677978&view=diff
==============================================================================
---
stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/entityhub/it/EntityhubTest.java
(original)
+++
stanbol/trunk/integration-tests/src/test/java/org/apache/stanbol/entityhub/it/EntityhubTest.java
Wed May 6 12:45:07 2015
@@ -248,17 +248,22 @@ public final class EntityhubTest extends
}
Assert.assertNotNull(f.isFile());
ZipFile archive = new ZipFile(f);
- for(Enumeration<? extends ZipEntry> e =
archive.entries();e.hasMoreElements();){
- ZipEntry entry = e.nextElement();
- RequestExecutor re = executor.execute(
- buildImportRdfData(archive.getInputStream(entry) ,RDF_XML,
false, null));
- //assert that the entity was created (or already existed)
- //some projects seams to have more than a single doap file
- int status = re.getResponse().getStatusLine().getStatusCode();
- Assert.assertTrue("Unable to add '"+entry.getName()+"'! Status:"
- + re.getResponse().getStatusLine(), status == 200 ||
status == 304);
+ try {
+ for(Enumeration<? extends ZipEntry> e =
archive.entries();e.hasMoreElements();){
+ ZipEntry entry = e.nextElement();
+ log.debug(" - uploading {} to entityhub",entry);
+ RequestExecutor re = executor.execute(
+ buildImportRdfData(archive.getInputStream(entry) ,RDF_XML,
false, null));
+ //assert that the entity was created (or already existed)
+ //some projects seams to have more than a single doap file
+ int status = re.getResponse().getStatusLine().getStatusCode();
+ Assert.assertTrue("Unable to add '"+entry.getName()+"'!
Status:"
+ + re.getResponse().getStatusLine(), status == 200 ||
status == 304);
+ }
+ } finally {
+ archive.close();
}
-
+
testFindNameQuery();
testFindWildcards();
testFindLimitAndOffsetQuery();