Skip to content

Explicitly close tcp connection in Prometheus test#121

Open
KaitCrawford wants to merge 3 commits into
developfrom
feature/Add-collectstatic
Open

Explicitly close tcp connection in Prometheus test#121
KaitCrawford wants to merge 3 commits into
developfrom
feature/Add-collectstatic

Conversation

@KaitCrawford

Copy link
Copy Markdown
Contributor

No description provided.

@jerith jerith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 with an optional change mentioned inline. Feel free to merge with or without making the change.

Comment thread tests/test.py Outdated
[sample] = http_requests_total_for_view(
response.text, 'prometheus-django-metrics')
assert_that(sample.value, Equals(1.0))
response.close()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this, given that we already read the whole request body (with response.text above) and all it does is release the connection back to the pool for reuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants