|
141 | 141 | "\n", |
142 | 142 | "# 1) Prioritized API calls\n", |
143 | 143 | "utils.print_message('1/5: Starting API calls for prioritized distribution (50/50)')\n", |
144 | | - "output = reqs.multiGet('/lb-prioritized', runs = 15, msg = 'Calling prioritized APIs')\n", |
145 | | - "tests.verify(len(output), 15)\n", |
| 144 | + "api_results_prioritized = reqs.multiGet('/lb-prioritized', runs = 15, msg = 'Calling prioritized APIs')\n", |
| 145 | + "tests.verify(len(api_results_prioritized), 15)\n", |
146 | 146 | "\n", |
147 | 147 | "# # 2) Weighted API calls\n", |
148 | 148 | "zzzs()\n", |
149 | 149 | "utils.print_message('2/5: Starting API calls for weighted distribution (50/50)', blank_above = True)\n", |
150 | | - "output = reqs.multiGet('/lb-weighted-equal', runs = 15, msg = 'Calling weighted (equal) APIs')\n", |
151 | | - "tests.verify(len(output), 15)\n", |
| 150 | + "api_results_weighted_equal = reqs.multiGet('/lb-weighted-equal', runs = 15, msg = 'Calling weighted (equal) APIs')\n", |
| 151 | + "tests.verify(len(api_results_weighted_equal), 15)\n", |
152 | 152 | "\n", |
153 | 153 | "# # 3) Weighted API calls\n", |
154 | 154 | "zzzs()\n", |
155 | 155 | "utils.print_message('3/5: Starting API calls for weighted distribution (80/20)', blank_above = True)\n", |
156 | | - "output = reqs.multiGet('/lb-weighted-unequal', runs = 15, msg = 'Calling weighted (unequal) APIs')\n", |
157 | | - "tests.verify(len(output), 15)\n", |
| 156 | + "api_results_weighted_unequal = reqs.multiGet('/lb-weighted-unequal', runs = 15, msg = 'Calling weighted (unequal) APIs')\n", |
| 157 | + "tests.verify(len(api_results_weighted_unequal), 15)\n", |
158 | 158 | "\n", |
159 | 159 | "# 4) Prioritized & weighted API calls\n", |
160 | 160 | "zzzs()\n", |
161 | 161 | "utils.print_message('4/5: Starting API calls for prioritized & weighted distribution', blank_above = True)\n", |
162 | | - "output = reqs.multiGet('/lb-prioritized-weighted', runs = 20, msg = 'Calling prioritized & weighted APIs')\n", |
163 | | - "tests.verify(len(output), 20)\n", |
| 162 | + "api_results_prioritized_and_weighted = reqs.multiGet('/lb-prioritized-weighted', runs = 20, msg = 'Calling prioritized & weighted APIs')\n", |
| 163 | + "tests.verify(len(api_results_prioritized_and_weighted), 20)\n", |
164 | 164 | "\n", |
165 | 165 | "# 5) Prioritized & weighted API calls (500ms sleep)\n", |
166 | 166 | "zzzs()\n", |
167 | 167 | "utils.print_message('5/5: Starting API calls for prioritized & weighted distribution (500ms sleep)', blank_above = True)\n", |
168 | | - "output = reqs.multiGet('/lb-prioritized-weighted', runs = 20, msg = 'Calling prioritized & weighted APIs', sleepMs = 500)\n", |
169 | | - "tests.verify(len(output), 20)\n", |
| 168 | + "api_results_prioritized_and_weighted_sleep = reqs.multiGet('/lb-prioritized-weighted', runs = 20, msg = 'Calling prioritized & weighted APIs', sleepMs = 500)\n", |
| 169 | + "tests.verify(len(api_results_prioritized_and_weighted_sleep), 20)\n", |
170 | 170 | "\n", |
171 | 171 | "tests.print_summary()\n", |
172 | 172 | "\n", |
|
0 commit comments