Skip to content

Commit 6583a83

Browse files
committed
update test code
Signed-off-by: emdneto <[email protected]>
1 parent 2bd2188 commit 6583a83

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/opentelemetry-test-utils/src/opentelemetry/test/asgitestutil.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,14 @@ async def send_input(self, message):
100100
async def send_default_request(self):
101101
await self.send_input({"type": "http.request", "body": b""})
102102

103-
async def get_output(self):
104-
output = await self.communicator.receive_output(0)
105-
return output
103+
async def get_output(self, timeout=1):
104+
return await self.communicator.receive_output(timeout)
106105

107-
async def get_all_output(self):
106+
async def get_all_output(self, timeout=1):
108107
outputs = []
109108
while True:
110109
try:
111-
outputs.append(await self.get_output())
110+
outputs.append(await self.communicator.receive_output(timeout))
112111
except asyncio.TimeoutError:
113112
break
114113
return outputs

0 commit comments

Comments
 (0)