File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
frameworks/Ruby/roda-sequel Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ def set_default_headers(response)
4444 # Test type 3: Multiple database queries
4545 r . is "queries" do
4646 response [ CONTENT_TYPE ] = JSON_TYPE
47+ ids = ALL_IDS . sample ( bounded_queries )
4748 worlds =
4849 DB . synchronize do
49- ALL_IDS . sample ( bounded_queries ) . map do |id |
50+ ids . map do |id |
5051 World . with_pk ( id ) . values
5152 end
5253 end
@@ -69,9 +70,10 @@ def set_default_headers(response)
6970 r . is "updates" do
7071 response [ CONTENT_TYPE ] = JSON_TYPE
7172 worlds = [ ]
73+ ids = ALL_IDS . sample ( bounded_queries )
7274 DB . synchronize do
7375 worlds =
74- ALL_IDS . sample ( bounded_queries ) . map do |id |
76+ ids . map do |id |
7577 world = World . with_pk ( id )
7678 new_value = rand1
7779 new_value = rand1 while new_value == world . randomnumber
You can’t perform that action at this time.
0 commit comments