Answer stability round 1: 0 🔴, 10 🟡 (0 misread); take the failed test's last message, fail on a docker run that never started, keep testdata as planted, show finished runs when the API refuses one, and test five survivors
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
task-bench runs it in a container of its own, as `python api_proxy.py <host:port> [<listen port>]`: the containers Haiku works in sit
|
||||
on a network with no route out, and reach the API through it and nothing else. It imports only the standard library, since that
|
||||
container holds nothing more."""
|
||||
container doesn't hold anything more."""
|
||||
import asyncio
|
||||
import contextlib
|
||||
import sys
|
||||
@@ -23,7 +23,7 @@ async def served(allowed: str, reader: asyncio.StreamReader, writer: asyncio.Str
|
||||
there_reader, there_writer = await asyncio.open_connection(host, int(port))
|
||||
writer.write(b"HTTP/1.1 200 Connection established\r\n\r\n")
|
||||
await writer.drain()
|
||||
# Either side closing ends the tunnel, so the other copy is cancelled rather than left waiting.
|
||||
# Either side closing ends the tunnel, so the other copy is cancelled.
|
||||
copies = [asyncio.ensure_future(copied(reader, there_writer)), asyncio.ensure_future(copied(there_reader, writer))]
|
||||
await asyncio.wait(copies, return_when=asyncio.FIRST_COMPLETED)
|
||||
for copy in copies:
|
||||
|
||||
Reference in New Issue
Block a user