Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added comments to load test locustfile.py #407

Merged
merged 4 commits into from
Jul 26, 2023
Merged

Conversation

jrconlin
Copy link
Member

Added some comments per discussion with @Trinaa.

I marked things that are curious or inexplicable with "NOTE:"

Please feel free to either ignore, improve, or whatever.

@jrconlin jrconlin requested review from Trinaa and b4handjr July 24, 2023 20:52
Copy link
Collaborator

@b4handjr b4handjr left a comment

Choose a reason for hiding this comment

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

Hey JR, thanks for adding these comments! I think there are some comments that may be best held for a future update, I think we should file an issue for enhancing this in the short term as we will be looking to expand this suite in the next month.

Comment on lines +72 to +73
[Autopush HTTP Endpoints for Notifications](https://mozilla-services.github.io/autopush-rs/http.html#push-service-http-api)
for details).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this render in the file? This looks like a markdown style link.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it depends on whatever you're using to render the docs. I believe that Sphinx has a markdown plug in.

I tend to use markdown because I find it easier to read than RST.

Comment on lines +200 to +204
# NOTE: I believe that this is cruft from an earlier system. This condition
# should just be replaced with
# ```
# endpoint_url = res["pushEndpoint"]
# ```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you think we need these notes here? Or would it be better off to track these externally so when we fix them, we won't have to edit this file again.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm fine either way. I wanted to capture things like this in the code for now since I was going through it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I had a chat with Kat, I think I didn't understand the context of this PR. Thank you for going through and explaining all the steps, I learned some stuff for sure!

@Trinaa
Copy link
Contributor

Trinaa commented Jul 26, 2023

@jrbenny35 I'm thinking to merge this PR so that the context is available in the document history? When we refactor we can edit/add/remove them accordingly.

Copy link
Member

@pjenvey pjenvey left a comment

Choose a reason for hiding this comment

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

Just an optional suggestion, LGTM otherwise

@@ -132,7 +227,12 @@ def test_basic_topic(self):
assert (
endpoint_res.status_code == 201
), f"status code was {endpoint_res.status_code}"
# connect and check notification

# NOTE: To properly test "topic" messages, we really ought to
Copy link
Member

Choose a reason for hiding this comment

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

This almost sounds like a TODO but test_connect_stored does this. Maybe reword or maybe mention it here?

Copy link
Member Author

Choose a reason for hiding this comment

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

test_connect_stored kind of does that.

What it does is send in 10 topic messages, then read from the queue 10 times looking to see if the response matches. Since the response is never ACK'd, it's never removed, and all 10 work correctly, but it feels like that's a bug rather than a feature.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, my mistake

@jrconlin jrconlin merged commit c82e104 into master Jul 26, 2023
@jrconlin jrconlin deleted the docs/load_comment branch July 26, 2023 19:36
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.

4 participants