Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Issues/gh 1236 testsuite refactor #260

Merged
merged 4 commits into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compliance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<packaging>pom</packaging>

<modules>
<module>sail-model</module>
<module>sparql</module>
<module>lucene</module>
<module>elasticsearch</module>
Expand Down
74 changes: 0 additions & 74 deletions compliance/sail-model/pom.xml

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions compliance/sail-model/src/test/resources/logback-test.xml

This file was deleted.

6 changes: 0 additions & 6 deletions compliance/serql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@
<description>Tests for the SeRQL query language implementation</description>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-runtime</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-serql-testsuite</artifactId>
Expand Down
4 changes: 1 addition & 3 deletions compliance/sparql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
<description>Tests for the SPARQL query language implementation</description>

<properties>
<!-- we use a released version of RDF4J Server for spinning up a SPARQL endpoint to test SERVICE queries against -->
<rdf4j.server.version>2.5.0</rdf4j.server.version>
<jetty.version>7.0.2.v20100331</jetty.version>
</properties>
<dependencies>
Expand Down Expand Up @@ -118,7 +116,7 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rdf4j-http-server</artifactId>
<version>${rdf4j.server.version}</version>
<version>${project.version}</version>
<type>war</type>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/*******************************************************************************
* Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Distribution License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*******************************************************************************/
package org.eclipse.rdf4j.query.parser.sparql;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.util.Arrays;

import org.eclipse.rdf4j.model.vocabulary.FOAF;
import org.eclipse.rdf4j.query.QueryLanguage;
import org.eclipse.rdf4j.query.Update;
import org.eclipse.rdf4j.repository.Repository;
import org.eclipse.rdf4j.repository.http.HTTPRepository;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

/**
* @author jeen
*/
public class HTTPSparqlUpdateTest extends SPARQLUpdateTest {

private static SPARQLEmbeddedServer server;

private static String repositoryId = "test-sparql";

@BeforeClass
public static void startServer() throws Exception {
server = new SPARQLEmbeddedServer(Arrays.asList(repositoryId));
try {
server.start();
} catch (Exception e) {
server.stop();
throw e;
}
}

@AfterClass
public static void stopServer() throws Exception {
server.stop();
}

@Override
protected Repository newRepository() throws Exception {
return new HTTPRepository(server.getRepositoryUrl(repositoryId));
}

@Ignore
@Test
@Override
public void testAutoCommitHandling() {
// transaction isolation is not supported for HTTP connections. disabling
// test.
System.err.println("temporarily disabled testAutoCommitHandling() for HTTPRepository. See SES-1652");
}

@Test
public void testBindingsInUpdateTransaction() throws Exception {
// See issue SES-1889
logger.debug("executing test testBindingsInUpdateTransaction");

StringBuilder update1 = new StringBuilder();
update1.append(getNamespaceDeclarations());
update1.append("DELETE { ?x foaf:name ?y } WHERE {?x foaf:name ?y }");

try {
assertTrue(con.hasStatement(bob, FOAF.NAME, f.createLiteral("Bob"), true));
assertTrue(con.hasStatement(alice, FOAF.NAME, f.createLiteral("Alice"), true));

con.begin();
Update operation = con.prepareUpdate(QueryLanguage.SPARQL, update1.toString());
operation.setBinding("x", bob);

operation.execute();

con.commit();

// only bob's name should have been deleted (due to the binding)
assertFalse(con.hasStatement(bob, FOAF.NAME, f.createLiteral("Bob"), true));
assertTrue(con.hasStatement(alice, FOAF.NAME, f.createLiteral("Alice"), true));

} catch (Exception e) {
if (con.isActive()) {
con.rollback();
}
}
}

@Ignore
@Test
@Override
public void testConsecutiveUpdatesInSameTransaction() {
// transaction isolation is not supported for HTTP connections. disabling
// test.
System.err.println(
"temporarily disabled testConsecutiveUpdatesInSameTransaction() for HTTPRepository. See SES-1652");
}
}
13 changes: 9 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.eclipse.rdf4j</groupId>
<artifactId>rdf4j-storage-parent</artifactId>
<version>3.0-SNAPSHOT</version>
<version>3.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>RDF4J Storage</name>
Expand Down Expand Up @@ -70,8 +70,7 @@
<module>spin</module>
<module>shacl</module>
<module>storage</module>
<module>testsuites</module>
<module>compliance</module>
<module>testsuites</module>
</modules>

<profiles>
Expand Down Expand Up @@ -189,6 +188,12 @@
<maven.test.skip>true</maven.test.skip>
</properties>
</profile>
<profile>
<id>compliance</id>
<modules>
<module>compliance</module>
</modules>
</profile>
<profile>
<id>doclint-java8-disable</id>
<activation>
Expand All @@ -205,7 +210,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<slf4j.version>1.7.25</slf4j.version>
<logback.version>1.1.11</logback.version>
<httpclient.version>4.5.9</httpclient.version>
<httpclient.version>4.5.9</httpclient.version>
<httpcore.version>4.4.11</httpcore.version>
<jackson.version>2.9.8</jackson.version>
<jsonldjava.version>0.12.1</jsonldjava.version>
Expand Down
Loading