Closed eggplants closed 2 years ago
$ grep -r '"http' test/*py
test/4store__v1_1_5__agroportal__test.py:endpoint = "http://sparql.agroportal.lirmm.fr/sparql/"
test/agrovoc-allegrograph_on_hold.py:endpoint = "http://202.45.139.84:10035/catalogs/fao/repositories/agrovoc"
test/allegrograph__v4_14_1__mmi__test.py:endpoint = "https://mmisw.org/sparql"
test/blazegraph__wikidata__test.py:endpoint = "https://query.wikidata.org/sparql"
test/fuseki2__v3_6_0__agrovoc__BROKEN.py:endpoint = "http://agrovoc.uniroma2.it:3030/agrovoc/sparql"
test/fuseki2__v3_8_0__stw__test.py:endpoint = "http://zbw.eu/beta/sparql/stw/query"
test/graphdbEnterprise__v8_9_0__rs__BROKEN.py:endpoint = "http://rs.ontotext.com/repositories/ff-news"
test/lov-fuseki_on_hold.py:endpoint = "https://lov.linkeddata.es/dataset/lov/sparql/"
test/rdf4j__geosciml__test.py:endpoint = "http://vocabs.ands.org.au/repository/api/sparql/csiro_international-chronostratigraphic-chart_2018-revised-corrected"
test/stardog__lindas__test.py:endpoint = "https://lindas.admin.ch/query"
test/virtuoso__v7_20_3230__dbpedia__test.py:endpoint = "http://dbpedia.org/sparql"
test/virtuoso__v8_03_3313__dbpedia__test.py:endpoint = "https://live.dbpedia.org/sparql"
test/wrapper_test.py: sparql = SPARQLWrapper("http://example.org/sparql")
grep -Er 'endpoint = "http[^"]+"' test/*py |
sed 's/ #.*//' | tr -d '"' |
awk -F 'py:endpoint = ' '$0=$2' |
while read i; do
echo "[$i]"
time rqw -e "$i" \
-Q "select ?x {?x ?y ?z} limit 1"
done |&> log
Some endpoints are currently dead.
I think the right approach here may be to work with docker containers for testing instead of remote endpoints as much as possible, but I agree, they are too slow.
I think this is still an issue, for me at least test takes a couple of minutes. Should be much quicker.
Re-opening this, as it is still too slow for comfort. One option may be to use https://github.com/kiwicom/pytest-recording
http://sparql.agroportal.lirmm.fr/sparql/ is unstable. If can, we have to change it to other stable 4store endpoint.
$ for i in test/*.py; do
[[ "$i" =~ 4store ]] && continue
echo "[$i]"
time (python -m unittest -q "$i" &>/dev/null)
done &> log
$ cat log
[test/__init__.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 0.07s user 0.05s system 86% cpu 0.143 total
[test/agrovoc-allegrograph_on_hold.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 0.78s user 0.12s system 1% cpu 56.535 total
[test/allegrograph__v4_14_1__mmi__test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 1.27s user 0.18s system 3% cpu 42.402 total
[test/blazegraph__wikidata__test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 7.36s user 0.26s system 2% cpu 5:57.60 total
[test/cli_test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 0.30s user 0.08s system 23% cpu 1.627 total
[test/fuseki2__v3_6_0__agrovoc__BROKEN.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 1.37s user 0.17s system 1% cpu 1:50.61 total
[test/fuseki2__v3_8_0__stw__test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 0.43s user 0.12s system 0% cpu 5:22.25 total
[test/graphdbEnterprise__v8_9_0__rs__BROKEN.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 0.41s user 0.11s system 1% cpu 48.960 total
[test/lov-fuseki_on_hold.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 1.71s user 0.17s system 1% cpu 2:06.42 total
[test/rdf4j__geosciml__test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 0.47s user 0.11s system 1% cpu 30.167 total
[test/stardog__lindas__test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 0.92s user 0.13s system 1% cpu 1:08.37 total
[test/virtuoso__v7_20_3230__dbpedia__test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 5.68s user 0.21s system 0% cpu 23:08.75 total
[test/virtuoso__v8_03_3313__dbpedia__test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 5.75s user 0.23s system 0% cpu 20:39.26 total
[test/wrapper_test.py]
( python3 -m unittest -q "$i" &> /dev/null; ) 0.19s user 0.07s system 87% cpu 0.298 total
@eggplants please do change to other more stable stores! Although, there must be a stable AgroPortal SPARQL store out there surely? AgroPortal's a large vocab user after all.
test/virtuoso__v7*
's endpoint
test/virtuoso__v8*
's endpoint
test/4store*
's endpoint
Does anyone know of any public endpoints that are using Virtuoso version 08? (except http://live.dbpedia.org/sparql)
No, sorry! All of the SPARQL stores I implement (about 10 public) use Jena. I'll ask around though
Due to merge #184, Test time has been reduced to less than 15*4 minutes. Had this issue almost been resolved?
I would like it even faster, but I guess we can close it and open another, ideally we should be using something like pytest-recording where we can't use test containers, and use test containers otherwise, but there is no rush for this, thank you very much for what you did.
I am going to convert tests from unittest into pytest.
It looks like we can use @pytest.mark.parametrize
to commonize tests by endpoint.
I am going to convert tests from unittest into pytest. It looks like we can use
@pytest.mark.parametrize
to commonize tests by endpoint.
sounds great, I will close this issue though, we can handle new improvements as they come, but to me I think the tests should run within less than 3 minutes ideally.
Some endpoints, like https://live.dbpedia.org/sparql and https://dbpedia.org/sparql, is too slow and unit tests take also too much time to finish due to them. On the other hand, https://ja.dbpedia.org/sparql is too fast to get a response. I think this difference is caused by https://ja.dbpedia.org's resource size that is maybe smaller than https://dbpedia.org's one. So I suggest endpoint for test changes into https://ja.dbpedia.org or more smaller DB endpoint.