Skip to content
Snippets Groups Projects
Commit c9f67cac authored by Thorsten Vitt's avatar Thorsten Vitt
Browse files

Refactored EPUB test to integration test.

It does currently timeout, though.

git-svn-id: https://develop.sub.uni-goettingen.de/repos/textgrid/trunk/services/aggregator@13868 7c539038-3410-0410-b1ec-0f2a7bf1c452
parent bd620c46
No related branches found
No related tags found
No related merge requests found
......@@ -17,21 +17,25 @@
import net.sf.saxon.s9api.SaxonApiException;
import org.apache.cxf.jaxrs.client.ClientConfiguration;
import org.apache.cxf.jaxrs.client.WebClient;
import org.junit.Assert;
import org.junit.Test;
import com.google.common.io.NullOutputStream;
public class EPUBTest {
public class EpubIT {
@Test
public void testGet() throws ObjectNotFoundFault, MetadataParseFault,
IoFault, AuthFault, ProtocolNotImplementedFault, WebApplicationException, IOException, SaxonApiException {
final EPUB epub = new EPUB(TextGridRepProvider.getInstance());
final Response response = epub.get(URI.create("textgrid:jfst.0"), null,
null);
WebClient webClient = WebClient.create(System.getProperty("service.url")).path("epub/{1}", "textgrid:jfst.0");
ClientConfiguration config = WebClient.getConfig(webClient);
config.setSynchronousTimeout(180000);
final Response response = webClient.get();
Assert.assertEquals(200, response.getStatus());
Assert.assertTrue(response.getEntity() instanceof EPUBSerializer);
// Assert.assertTrue(response.getEntity() instanceof EPUBSerializer);
((StreamingOutput) response.getEntity()).write(new NullOutputStream());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment