-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add PG tests infrastructure #1581
Conversation
cdc197d
to
2ec78aa
Compare
static void waitUntil(Closure closure, long timeout = 1000, long pollInterval = 100) { | ||
with().pollDelay(0, MILLISECONDS) | ||
.pollInterval(pollInterval, MILLISECONDS) | ||
.await() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need the await() method here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That method don't do anything and just return this, but it is used to enhance the readability of test conditions
@@ -32,4 +34,12 @@ class PBSUtils { | |||
static String getRandomString(int stringLength = 20) { | |||
RandomStringUtils.randomAlphanumeric(stringLength) | |||
} | |||
|
|||
static void waitUntil(Closure closure, long timeout = 1000, long pollInterval = 100) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the functionality of the checkRequestCount method is duplicated, so you can remove it. Or use it instead of the given method
reset(USER_DETAILS_ENDPOINT_PATH) | ||
} | ||
|
||
void setResponse() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add Override annotation where necessary for better readability
} | ||
|
||
void setUserDataResponse(UserDetailsResponse userDataResponse, HttpStatusCode httpStatusCode = OK_200) { | ||
resetUserDetailsEndpoint() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you using reset here? There were no expectations set for this endpoint before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is an infrastructure PR, expectations are set in the test specs from other PG PRs (e.g. in some test methods from UserDetailsSpec, #1590)
* Add PG tests for Alert, Currency, Plans, Register services * Add currency conversion rates mock; fix CurrencySpec * Moved setting bid request and response to the setup() * Use soft assert where needed Co-authored-by: mhupalo <mhupalo@rubiconproject.com>
* Add PG tests to cover auction and tokens * Removed setting bid response where it doesn't matter * Use soft assert where needed; parametrization style updated Co-authored-by: mhupalo <mhupalo@rubiconproject.com>
* Add PG bidder request, bid response, user details specs * Resolve PR remarks * Use soft assert where needed Co-authored-by: mhupalo <mhupalo@rubiconproject.com>
* Add PG report, targeting specs * Resolve PR remarks * Add test case to cover domain targeting bug * Add test cases to cover scalar and array inputs by site/user first party data, bidder params * Add test case to cover NPE is not thrown by site/user first party data Co-authored-by: mhupalo <mhupalo@rubiconproject.com> Co-authored-by: rpanchyk <rpanchyk@rubiconproject.com>
6e0885c
to
054c4d9
Compare
b044b51
to
c39af80
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Infrastructure before adding tests on PBS PG functionality