From aaa730d68437bff0901d1784542825de86ae62e8 Mon Sep 17 00:00:00 2001 From: Tpt Date: Sun, 21 Nov 2021 16:17:37 +0100 Subject: [PATCH] Adds an update test about dirty reads --- testsuite/oxigraph-tests/sparql/manifest.ttl | 7 +++++++ testsuite/oxigraph-tests/sparql/update_dirty_read.ru | 3 +++ .../oxigraph-tests/sparql/update_dirty_read_result.ttl | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 testsuite/oxigraph-tests/sparql/update_dirty_read.ru create mode 100644 testsuite/oxigraph-tests/sparql/update_dirty_read_result.ttl diff --git a/testsuite/oxigraph-tests/sparql/manifest.ttl b/testsuite/oxigraph-tests/sparql/manifest.ttl index b68f6255..630ed626 100644 --- a/testsuite/oxigraph-tests/sparql/manifest.ttl +++ b/testsuite/oxigraph-tests/sparql/manifest.ttl @@ -3,6 +3,7 @@ @prefix rdfs: . @prefix mf: . @prefix qt: . +@prefix ut: . <> rdf:type mf:Manifest ; rdfs:label "Oxigraph SPARQL tests" ; @@ -17,6 +18,7 @@ :values_in_filter_not_exists :subquery_in_filter_not_exists :cmp_langString + :update_dirtyRead ) . :describe rdf:type mf:QueryEvaluationTest ; @@ -71,3 +73,8 @@ mf:name "rdf:langString with the same language are comparable" ; mf:action [ qt:query ] ; mf:result . + +:update_dirty_read rdf:type mf:UpdateEvaluationTest ; + mf:name "An update operation should not be able to read its own writes" ; + mf:action [ ut:request ] ; + mf:result [ ut:data ] . diff --git a/testsuite/oxigraph-tests/sparql/update_dirty_read.ru b/testsuite/oxigraph-tests/sparql/update_dirty_read.ru new file mode 100644 index 00000000..90f852ed --- /dev/null +++ b/testsuite/oxigraph-tests/sparql/update_dirty_read.ru @@ -0,0 +1,3 @@ +PREFIX ex: +INSERT DATA { ex:s ex:p 1 . ex:s ex:p 5 }; +INSERT { ex:s ex:p ?v } WHERE { VALUES ?o { 1 2 5 6 } FILTER EXISTS { ?s ex:p ?o } BIND(?o + 1 AS ?v) } diff --git a/testsuite/oxigraph-tests/sparql/update_dirty_read_result.ttl b/testsuite/oxigraph-tests/sparql/update_dirty_read_result.ttl new file mode 100644 index 00000000..e06f993b --- /dev/null +++ b/testsuite/oxigraph-tests/sparql/update_dirty_read_result.ttl @@ -0,0 +1,3 @@ +@prefix ex: . + +ex:s ex:p 1 , 2 , 5 , 6 .