(block: number)
| 137 | // the suite's lifetime means two suites racing for the same block can never |
| 138 | // both win (the second bind EADDRINUSEs and walks on). |
| 139 | const tryLockBlock = (block: number): Promise<Server | undefined> => |
| 140 | new Promise((done) => { |
| 141 | const server = createServer(); |
| 142 | server.once("error", () => done(undefined)); |
| 143 | server.listen(block + LOCK_OFFSET, "127.0.0.1", () => done(server)); |
| 144 | }); |
| 145 | |
| 146 | /** |
| 147 | * Claim a free set of ports for a target and publish them via env. Starts at |