Skip to content

Commit

Permalink
#266: Test TDB deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-asprino committed Nov 14, 2023
1 parent f45decc commit bf69d24
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
import org.apache.jena.query.*;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.riot.Lang;
import org.apache.jena.riot.RDFDataMgr;
import org.apache.jena.sparql.engine.main.QC;
import org.apache.jena.system.Txn;
import org.apache.jena.tdb2.TDB2Factory;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
Expand Down Expand Up @@ -625,6 +628,22 @@ public void testIssue291() {

}

@Test
@Ignore
public void playWithTDBLoc() throws IOException {
String testFolder = "tmp/testTDB";
Dataset d1 = TDB2Factory.connectDataset(testFolder);
Txn.executeWrite(d1, ()->{
RDFDataMgr.read(d1, "https://www.w3.org/1999/02/22-rdf-syntax-ns#");
});

Txn.executeRead(d1, ()->{
RDFDataMgr.write(System.out, d1, Lang.TRIG);
});
d1.close();
FileUtils.deleteDirectory(new File(testFolder));
}


/**
* See <a href="https://github.com/SPARQL-Anything/sparql.anything/issues/295">...</a>
Expand Down

0 comments on commit bf69d24

Please sign in to comment.