Skip to content

Conversation

DmitryBogatko
Copy link
Contributor

No description provided.

@DmitryBogatko DmitryBogatko requested a review from knysh September 16, 2019 07:04
getBrowser().getDriver().findElement(By.id("not_exist_element"));
}catch (NoSuchElementException e){
endTime = getCurrentTimeInSeconds();
durationSample = new DurationSample(timer.duration(), waitTime, 3);
Copy link
Contributor

Choose a reason for hiding this comment

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

3 is hardcoded twice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to class variable

"Conditional should be true", Collections.singleton(IllegalArgumentException.class));
} catch (org.openqa.selenium.TimeoutException e){
double duration = timer.stop();
DurationSample durationSample = new DurationSample(timer.duration(), waitForTimeoutCondition, 7);
Copy link
Contributor

Choose a reason for hiding this comment

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

7 is hardcoded 5 times in this class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to class variable

}, waitForTimeoutCondition, waitForTimeoutPolling,
"Conditional should be true", Collections.singleton(IllegalArgumentException.class));
double duration = timer.stop();
DurationSample durationSample = new DurationSample(timer.duration(), waitForTimeoutCondition, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

0 for deviation is set 4 times in this class, should it be a private method or a default value for this parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed: created new constructor with default deviation equal '0'

@DmitryBogatko DmitryBogatko merged commit e277eeb into master Sep 20, 2019
@paveliam paveliam deleted the envvar-issue-fix branch April 7, 2020 10:59
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.

3 participants