Skip to content

Commit

Permalink
Merge pull request #145 from ncbo/update_minitest_assertions
Browse files Browse the repository at this point in the history
Comply with ruby style guide for minitest
  • Loading branch information
alexskr authored Dec 19, 2023
2 parents 6db93bb + 7d1846b commit acba942
Show file tree
Hide file tree
Showing 2 changed files with 225 additions and 245 deletions.
33 changes: 16 additions & 17 deletions test/test_chunks_write.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ def test_reentrant_queries
sleep(1.5)
count_queries = 0
tq = Thread.new {
5.times do
oq = "SELECT (count(?s) as ?c) WHERE { ?s a ?o }"
Goo.sparql_query_client.query(oq).each do |sol|
assert sol[:c].object > 0
end
count_queries += 1
end
5.times do
oq = "SELECT (count(?s) as ?c) WHERE { ?s a ?o }"
Goo.sparql_query_client.query(oq).each do |sol|
assert_operator 0, :<, sol[:c].object
end
count_queries += 1
end
}
tq.join
assert tput.alive?
assert_predicate tput, :alive?
assert_equal 5, count_queries
tput.join

Expand All @@ -110,13 +110,13 @@ def test_reentrant_queries
sleep(1.5)
count_queries = 0
tq = Thread.new {
5.times do
oq = "SELECT (count(?s) as ?c) WHERE { ?s a ?o }"
Goo.sparql_query_client.query(oq).each do |sol|
assert sol[:c].object > 0
end
count_queries += 1
end
5.times do
oq = "SELECT (count(?s) as ?c) WHERE { ?s a ?o }"
Goo.sparql_query_client.query(oq).each do |sol|
assert_operator 0, :<, sol[:c].object
end
count_queries += 1
end
}
tq.join
assert tdelete.alive?
Expand Down Expand Up @@ -144,7 +144,7 @@ def test_query_flood
50.times do |j|
oq = "SELECT (count(?s) as ?c) WHERE { ?s a ?o }"
Goo.sparql_query_client.query(oq).each do |sol|
assert sol[:c].object > 0
assert_operator 0, :<, sol[:c].object
end
end
}
Expand Down Expand Up @@ -182,6 +182,5 @@ def self.params_for_backend(method, graph_name, ntriples_file_path = nil)
end
params
end

end
end
Loading

0 comments on commit acba942

Please sign in to comment.