Skip to content

Commit

Permalink
fix failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nozik committed Feb 4, 2022
1 parent 3a43261 commit fb685b0
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,15 @@ async def _perform_request():

return _async_call(_perform_request())

def test_basic_multiple(self):
# We need to create separate clients because in httpx >= 0.19,
# closing the client after "with" means the second http call fails
self.perform_request(self.URL,
client=self.create_client(self.transport))
self.perform_request(self.URL,
client=self.create_client(self.transport))
self.assert_span(num_spans=2)


class TestSyncInstrumentationIntegration(BaseTestCases.BaseInstrumentorTest):
def create_client(
Expand Down Expand Up @@ -664,3 +673,10 @@ async def _perform_request():
return await _client.request(method, url, headers=headers)

return _async_call(_perform_request())

def test_basic_multiple(self):
# We need to create separate clients because in httpx >= 0.19,
# closing the client after "with" means the second http call fails
self.perform_request(self.URL, client=self.create_client())
self.perform_request(self.URL, client=self.create_client())
self.assert_span(num_spans=2)

0 comments on commit fb685b0

Please sign in to comment.