-
Notifications
You must be signed in to change notification settings - Fork 787
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
Integration Tests for Throttle Policy Reset Support Feature #13493
Integration Tests for Throttle Policy Reset Support Feature #13493
Conversation
…nto feature-throttle-policy-reset # Conflicts: # modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/throttling/ApplicationThrottlingResetTestCase.java
checkThrottling(apiInvocationUrl, requestHeaders, 5); | ||
} | ||
|
||
@Test(groups = { "wso2.am" }, description = "Test reset application throttling policy with request count limit") |
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.
Description incorrect
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.
Fixed with ea0b01f
@Test(groups = { "wso2.am" }, description = "Test reset application throttling policy with request count limit") | ||
public void testResetPolicyWithRequestCountLimit() throws Exception { | ||
//subscribe to API | ||
SubscriptionDTO subscriptionDTO = restAPIStore.subscribeToAPI(apiId, |
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.
Move subscription code to setEnvironment method
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.
Fixed with ea0b01f
requestHeaders.put("accept", "text/xml"); | ||
requestHeaders.put("content-type", "application/json"); | ||
String apiInvocationUrl = getAPIInvocationURLHttps(APIContext + "/" + APIVersion + "/"); | ||
|
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.
Code untill here should go to setEnvironment method
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.
Fixed with ea0b01f
requestHeaders.put("accept", "text/xml"); | ||
requestHeaders.put("content-type", "application/json"); | ||
String apiInvocationUrl = getAPIInvocationURLHttps(APIContext + "/" + APIVersion + "/"); | ||
|
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.
Code untill here should go to setEnvironment method
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.
Fixed with ea0b01f
Map<String, String> requestHeaders = new HashMap<String, String>(); | ||
requestHeaders.put("Authorization", "Bearer " + accessToken); | ||
requestHeaders.put("accept", "text/xml"); | ||
requestHeaders.put("content-type", "application/json"); |
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.
There are already defined content type constants for the values of these content types
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.
Fixed with ea0b01f
Related Issue: wso2/api-manager#2455
Related PRs