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

Fix passing host to user class when debugging #2365

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

LKajan
Copy link
Contributor

@LKajan LKajan commented Jun 21, 2023

HttpUser needs the host parameter but if not set directly it was not passed to the user class in run_single_user method like it is in runners.

@cyberw
Copy link
Collaborator

cyberw commented Jun 21, 2023

LGTM! Add an assert _env.parsed_options to explain to mypy that it wont be None in this particular case.

Environment is the most likely place to look for a running locustfile.
Set it also to the parsed_options to keep it backward compatibility.
@LKajan
Copy link
Contributor Author

LKajan commented Jun 26, 2023

I changed the statement order a bit to avoid the mypy error. I hope this is ok too.
Added the locustfile also to the Environment to better match the actual runner situation.

@cyberw
Copy link
Collaborator

cyberw commented Jun 26, 2023

The build is either really slow, or the test is sometimes hanging?

@LKajan
Copy link
Contributor Author

LKajan commented Jun 26, 2023

Yep, somehow the actions are stuck. All the tests seems to be passed but actions won't finish.

@cyberw cyberw merged commit 89faa4d into locustio:master Jun 26, 2023
12 checks passed
@cyberw
Copy link
Collaborator

cyberw commented Jun 26, 2023

Thx!

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.

None yet

2 participants