File tree 1 file changed +4
-2
lines changed
frameworks/Ruby/roda-sequel
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)
44
44
# Test type 3: Multiple database queries
45
45
r . is "queries" do
46
46
response [ CONTENT_TYPE ] = JSON_TYPE
47
+ ids = ALL_IDS . sample ( bounded_queries )
47
48
worlds =
48
49
DB . synchronize do
49
- ALL_IDS . sample ( bounded_queries ) . map do |id |
50
+ ids . map do |id |
50
51
World . with_pk ( id ) . values
51
52
end
52
53
end
@@ -69,9 +70,10 @@ def set_default_headers(response)
69
70
r . is "updates" do
70
71
response [ CONTENT_TYPE ] = JSON_TYPE
71
72
worlds = [ ]
73
+ ids = ALL_IDS . sample ( bounded_queries )
72
74
DB . synchronize do
73
75
worlds =
74
- ALL_IDS . sample ( bounded_queries ) . map do |id |
76
+ ids . map do |id |
75
77
world = World . with_pk ( id )
76
78
new_value = rand1
77
79
new_value = rand1 while new_value == world . randomnumber
You can’t perform that action at this time.
0 commit comments