You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2014/09/10 11:39:06 UTC

[15/17] git commit: Included official ldp-testsuite into marmotta-ldp tests - currently deactivated because all tests are skipped.

Included official ldp-testsuite into marmotta-ldp tests - currently deactivated because all tests are skipped.

DEPENDENCY UPGRADE: com.github.jsonld-java:jsonld-java-sesame from 0.2 to 0.5.0 (license checked)


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/df08c53e
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/df08c53e
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/df08c53e

Branch: refs/heads/ldp
Commit: df08c53ef57a7882990b0c750688c4c26d32612d
Parents: 98a73d1
Author: Jakob Frank <ja...@apache.org>
Authored: Mon Sep 8 14:35:03 2014 +0200
Committer: Jakob Frank <ja...@apache.org>
Committed: Wed Sep 10 10:00:43 2014 +0200

----------------------------------------------------------------------
 parent/pom.xml                                  |  2 +-
 platform/marmotta-ldp/pom.xml                   | 12 +++++++--
 .../marmotta/platform/ldp/LdpTestSuite.java     | 26 +++++++++++---------
 3 files changed, 25 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/df08c53e/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 4ed8ce2..a8ee85a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1488,7 +1488,7 @@
             <dependency>
                 <groupId>com.github.jsonld-java</groupId>
                 <artifactId>jsonld-java-sesame</artifactId>
-                <version>0.2</version>
+                <version>0.5.0</version>
             </dependency>
 
             <!-- Freemarker -->

http://git-wip-us.apache.org/repos/asf/marmotta/blob/df08c53e/platform/marmotta-ldp/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-ldp/pom.xml b/platform/marmotta-ldp/pom.xml
index 886f257..dcb5cc4 100644
--- a/platform/marmotta-ldp/pom.xml
+++ b/platform/marmotta-ldp/pom.xml
@@ -270,14 +270,22 @@
             <artifactId>sesame-sail-memory</artifactId>
             <scope>test</scope>
         </dependency>
-        <!--
         <dependency>
             <groupId>org.w3</groupId>
             <artifactId>ldp-testsuite</artifactId>
             <version>1.0.0-SNAPSHOT</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>log4j</groupId>
+                    <artifactId>log4j</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
-        -->
 
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/df08c53e/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpTestSuite.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpTestSuite.java b/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpTestSuite.java
index 9b46cfe..2af104d 100644
--- a/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpTestSuite.java
+++ b/platform/marmotta-ldp/src/test/java/org/apache/marmotta/platform/ldp/LdpTestSuite.java
@@ -17,13 +17,9 @@
 
 package org.apache.marmotta.platform.ldp;
 
-import com.jayway.restassured.RestAssured;
 import org.apache.marmotta.platform.core.test.base.JettyMarmotta;
 import org.apache.marmotta.platform.ldp.webservices.LdpWebService;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -34,12 +30,19 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- * LDP Test Suite runner
+ * LDP Test Suite runner, see <a href="https://github.com/w3c/ldp-testsuite">https://github.com/w3c/ldp-testsuite</a>.
  *
  * @author Sergio Fernández
+ * @author Jakob Frank
  */
+@Ignore("Something does not work, all tests in the ldp-testsuite are SKIPPED")
 public class LdpTestSuite {
 
+    /** @see org.testng.TestNG#HAS_FAILURE */
+    private static final int TESTNG_STATUS_HAS_FAILURE = 1;
+    /** @see org.testng.TestNG#HAS_NO_TEST */
+    private static final int TESTNG_STATUS_HAS_NO_TEST = 8;
+
     private static Logger log = LoggerFactory.getLogger(LdpTestSuite.class);
 
     private static JettyMarmotta marmotta;
@@ -49,9 +52,6 @@ public class LdpTestSuite {
     @BeforeClass
     public static void setup() throws URISyntaxException, IOException {
         marmotta = new JettyMarmotta("/marmotta", LdpWebService.class);
-        RestAssured.baseURI = "http://localhost";
-        RestAssured.port = marmotta.getPort();
-        RestAssured.basePath = marmotta.getContext();
         baseUrl = UriBuilder.fromUri("http://localhost").port(marmotta.getPort()).path(marmotta.getContext()).build().toString();
     }
 
@@ -63,13 +63,15 @@ public class LdpTestSuite {
 
     @Test
     public void testSuite() {
+        System.out.println("Running ldp-testsuite against " + baseUrl);
         Map<String, String> options = new HashMap<>();
         options.put("server", baseUrl);
         options.put("basic", null);
         options.put("non-rdf", null);
-        //org.w3.ldp.testsuite.LdpTestSuite testSuite = new org.w3.ldp.testsuite.LdpTestSuite(options);
-        //testSuite.run();
-        //Assert.assertEquals(0, testSuite.getStatus());
+        org.w3.ldp.testsuite.LdpTestSuite testSuite = new org.w3.ldp.testsuite.LdpTestSuite(options);
+        testSuite.run();
+        Assert.assertTrue("ldp-testsuite finished with errors",(testSuite.getStatus() & TESTNG_STATUS_HAS_FAILURE) == 0);
+        Assert.assertTrue("ldp-testsuite is empty - no test run",(testSuite.getStatus() & TESTNG_STATUS_HAS_NO_TEST) == 0);
     }
 
 }