test: changed `GET` to `POST` for probe with body
Policy probe needs body now as can provide some query elements.
MODIFY
gateway/test/src/test/resources/test-plan-data/policies/rate-limiting/003.5-probe-rate-limiting-state.resttest
gateway/test/src/test/resources/test-plan-data/policies/rate-limiting/003.5-probe-rate-limiting-state.resttest
-GET /organizations/Policy_RateLimitingTest/apis/echo/versions/1.0.0/policies/0?apiKey=12345 admin/admin
+POST /organizations/Policy_RateLimitingTest/apis/echo/versions/1.0.0/policies/0?apiKey=12345 admin/admin
Content-Type: application/json
X-API-Key: 12345
@@ -13,6 +13,7 @@ X-API-Key: 12345
Content-Type: application/json
{
+ "RateLimitingProbeResponse": {
"config": {
"limit": 5,
"granularity": "Client",
@@ -24,3 +25,4 @@ Content-Type: application/json
},
"probeType": "RateLimitingProbeResponse"
}
+}
\ No newline at end of file

MODIFY
gateway/test/src/test/resources/test-plan-data/policies/rate-limiting/008-probe-ip-rate-limiting.resttest
gateway/test/src/test/resources/test-plan-data/policies/rate-limiting/008-probe-ip-rate-limiting.resttest
-GET /organizations/Policy_RateLimitingTest/apis/echo/versions/1.0.0/policies/0?apiKey=12345-ip admin/admin
+POST /organizations/Policy_RateLimitingTest/apis/echo/versions/1.0.0/policies/0?apiKey=12345-ip admin/admin
Content-Type: application/json
X-API-Key: 12345-ip
@@ -13,6 +13,7 @@ X-API-Key: 12345-ip
Content-Type: application/json
{
+ "RateLimitingProbeResponse": {
"config": {
"limit": 1,
"granularity": "Ip",
@@ -24,3 +25,4 @@ Content-Type: application/json
},
"probeType": "RateLimitingProbeResponse"
}
+}
\ No newline at end of file

MODIFY
manager/api/war/tomcat8/src/main/java/io/apiman/manager/api/war/tomcat8/ApimanTransactionalInterceptor.java
manager/api/war/tomcat8/src/main/java/io/apiman/manager/api/war/tomcat8/ApimanTransactionalInterceptor.java
@@ -2,8 +2,6 @@ package io.apiman.manager.api.war.tomcat8;
import io.apiman.manager.api.core.exceptions.StorageException;
import io.apiman.manager.api.jpa.EntityManagerFactoryAccessor;
-import io.apiman.manager.api.rest.exceptions.AbstractRestException;
-import io.apiman.manager.api.rest.exceptions.SystemErrorException;
import io.apiman.manager.api.rest.impl.util.DataAccessUtilMixin;
import javax.annotation.Priority;
@@ -74,7 +72,7 @@ public class ApimanTransactionalInterceptor implements DataAccessUtilMixin {
}
private void handleException(Exception e, EntityTransaction tx) throws Exception {
- e.printStackTrace();
+ // e.printStackTrace();
if (e instanceof RuntimeException || e instanceof StorageException) {
tx.setRollbackOnly();
throw e;

test: changed `GET` to `POST` for probe with body

Policy probe needs body now as can provide some query elements.