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

Create http client once per user request #17

Merged
merged 1 commit into from
Nov 17, 2015

Conversation

innokenty
Copy link
Member

Create http client once per user request for a new session instead of creating a new client per each hub attempt. In the scenario when the grid is fully loaded which results in lots of reattemps that change drastically reduces the amount of clients created and therefore increases performance.

HttpResponse hubResponse = client.execute(post(target, message));
JsonMessage hubMessage = JsonMessageFactory.from(hubResponse.getEntity().getContent());

if (hubResponse.getStatusLine().getStatusCode() == SC_OK) {
Copy link
Contributor

Choose a reason for hiding this comment

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

MAJOR Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

@qatools-ci
Copy link
Contributor

SonarQube analysis reported 1 issue:

  • MAJOR 1 major

Watch the comments in this conversation to review them.

innokenty added a commit that referenced this pull request Nov 17, 2015
create http client once per user request
@innokenty innokenty merged commit 3a9ba81 into seleniumkit:master Nov 17, 2015
@innokenty innokenty changed the title create http client once per user request Create http client once per user request Dec 9, 2015
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