Return-Path: X-Original-To: apmail-marmotta-commits-archive@minotaur.apache.org Delivered-To: apmail-marmotta-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4503311489 for ; Tue, 16 Sep 2014 16:22:35 +0000 (UTC) Received: (qmail 35700 invoked by uid 500); 16 Sep 2014 16:22:35 -0000 Delivered-To: apmail-marmotta-commits-archive@marmotta.apache.org Received: (qmail 35665 invoked by uid 500); 16 Sep 2014 16:22:35 -0000 Mailing-List: contact commits-help@marmotta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@marmotta.apache.org Delivered-To: mailing list commits@marmotta.apache.org Received: (qmail 35652 invoked by uid 99); 16 Sep 2014 16:22:35 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Sep 2014 16:22:35 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E6370A1635D; Tue, 16 Sep 2014 16:22:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: wikier@apache.org To: commits@marmotta.apache.org Date: Tue, 16 Sep 2014 16:22:34 -0000 Message-Id: <9dbb8316cb7d4564aebe91d2f5502d44@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: MARMOTTA-508: improved test suite warn up Repository: marmotta Updated Branches: refs/heads/ldp 0a791f426 -> 3bdb2686c MARMOTTA-508: improved test suite warn up Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/9e73c3c2 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/9e73c3c2 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/9e73c3c2 Branch: refs/heads/ldp Commit: 9e73c3c2fd04a7e5410129b03eb2d1b9178d4f81 Parents: 0a791f4 Author: Sergio Fernández Authored: Tue Sep 16 18:18:56 2014 +0200 Committer: Sergio Fernández Committed: Tue Sep 16 18:18:56 2014 +0200 ---------------------------------------------------------------------- .../org/apache/marmotta/platform/ldp/LdpSuiteTest.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/9e73c3c2/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpSuiteTest.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpSuiteTest.java b/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpSuiteTest.java index 8b90b3e..771be78 100644 --- a/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpSuiteTest.java +++ b/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpSuiteTest.java @@ -17,7 +17,13 @@ package org.apache.marmotta.platform.ldp; +import com.hp.hpl.jena.xmloutput.impl.Basic; import org.apache.commons.io.IOUtils; +import org.apache.http.HttpResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; import org.apache.marmotta.platform.core.api.triplestore.SesameService; import org.apache.marmotta.platform.core.test.base.JettyMarmotta; import org.apache.marmotta.platform.ldp.api.LdpService; @@ -81,6 +87,10 @@ public class LdpSuiteTest { try { conn.begin(); + //warm up and initialization + HttpClient httpClient = HttpClientBuilder.create().build(); + final HttpResponse response = httpClient.execute(new HttpGet(baseUrl)); + Assume.assumeTrue(response.getStatusLine().getStatusCode() == 200); final String container = ldpService.addResource(conn, baseUrl, UriBuilder.fromUri(baseUrl).path(UUID.randomUUID().toString()).build().toString(), LdpService.InteractionModel.LDPC, RDFFormat.TURTLE.getDefaultMIMEType(), @@ -91,6 +101,8 @@ public class LdpSuiteTest { IOUtils.toInputStream("<> a . ")); conn.commit(); + //then actual test suite + log.info("Running W3C official LDP Test Suite against '{}' server", baseUrl); log.debug("(using {} as root container)", container); Map options = new HashMap<>();