()
| 221 | assert(resp[:3] == "+OK".encode('utf-8')) |
| 222 | |
| 223 | def init_blocking(): |
| 224 | global clients |
| 225 | if numkeys > 100 * numclients: |
| 226 | print("WARNING: High ratio of keys to clients. Most lpushes will not be popped and unblocking will take a long time!") |
| 227 | for i in range(numclients): |
| 228 | clients.append(Client('127.0.0.1', 6379)) |
| 229 | if i % 2: |
| 230 | handle_blpop_response(clients[-1]) |
| 231 | else: |
| 232 | handle_lpush_response(clients[-1]) |
| 233 | |
| 234 | def init_lpush(): |
| 235 | global clients |
nothing calls this directly
no test coverage detected