This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eclipse-rdf4j/rdf4j#1236 shuffled some tests to deal with circular deps
- Loading branch information
1 parent
4ff77b3
commit df7756d
Showing
10 changed files
with
105 additions
and
1,659 deletions.
There are no files selected for viewing
105 changes: 105 additions & 0 deletions
105
...ance/sparql/src/test/java/org/eclipse/rdf4j/query/parser/sparql/HTTPSparqlUpdateTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
} |
218 changes: 0 additions & 218 deletions
218
testsuites/store/src/main/java/org/eclipse/rdf4j/repository/CascadeValueExceptionTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.