Skip to content

Commit

Permalink
Fix travis log length (#1140)
Browse files Browse the repository at this point in the history
* Move repeated @Sql annotations to class level (#1119)

* Fixing OWASP security warning for Tomcat dependency in Spring Web (#1132)

* Removed unnecessary request/response logging (to shorten travis logs)

* Address inspection comments

* Address inspection comments

* Address inspection comments

* Removed logging of graphQL model building to shorten length

* Fixed compilation error

Co-authored-by: Brutus5000 <[email protected]>
  • Loading branch information
aklish and Brutus5000 authored Jan 17, 2020
1 parent 7e05e91 commit 00dc2bc
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -914,11 +914,8 @@ private ValidatableResponse runQuery(String query) {
.contentType(MediaType.APPLICATION_JSON)
.accept(MediaType.APPLICATION_JSON)
.body(query)
.log().all()
.post("/graphQL")
.then()
.log()
.all();
.then();

return res;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ public void testFetchBridgeableStoreLoadSingleObjectToOne() {
.accept("application/vnd.api+json")
.get("/hibernateUser/1/specialAction")
.then()
.log().all()
.statusCode(HttpStatus.SC_OK)
.extract().body().asString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ void jsonApiTest() {
)
).toJSON())
)
.log().all()
.statusCode(HttpStatus.SC_OK);
}

Expand Down Expand Up @@ -89,7 +88,6 @@ void graphqlTest() {
.when()
.post("/graphql/api/v1")
.then()
.log().all()
.body(equalTo(GraphQLDSL.document(
selection(
field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private GraphQLObjectType buildQueryObject(Class<?> entityClass) {
return queryObjectRegistry.get(entityClass);
}

log.info("Building query object for {}", entityClass.getName());
log.debug("Building query object for {}", entityClass.getName());

String entityName = dictionary.getJsonAliasFor(entityClass);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public final void setUpServer() throws Exception {
String restassuredPort = System.getProperty("restassured.port", System.getenv("restassured.port"));
RestAssured.port =
Integer.parseInt(restassuredPort != null && !restassuredPort.isEmpty() ? restassuredPort : "9999");
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();

// embedded jetty server
server = new Server(RestAssured.port);
Expand All @@ -69,14 +70,6 @@ public final void setUpServer() throws Exception {
servletHolder.setInitParameter("jersey.config.server.provider.packages", packageName);
servletHolder.setInitParameter("javax.ws.rs.Application", resourceConfig);

/*
ServletHolder graphqlServlet = servletContextHandler.addServlet(ServletContainer.class, "/graphQL/*");
graphqlServlet.setInitOrder(2);
graphqlServlet.setInitParameter("jersey.config.server.provider.packages",
com.yahoo.elide.graphql.GraphQLEndpoint.class.getPackage().getName());
graphqlServlet.setInitParameter("javax.ws.rs.Application", resourceConfig);
*/

log.debug("...Starting Server...");
server.start();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ protected final Server setUpServer() throws Exception {
// setup RestAssured
RestAssured.baseURI = "http://localhost/";
RestAssured.basePath = "/";
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();

// port randomly picked in pom.xml
String restassuredPort = System.getProperty("restassured.port", System.getenv("restassured.port"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ void testOne2One() throws Exception {
.get("/right/1")
.then()
.statusCode(HttpStatus.SC_OK)
.log().all()
.extract()
.body().asString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ public void testChild() throws Exception {
@Test
public void testSubCollectionRelationships() throws Exception {
given().when().get("/parent/1/children/1/relationships/parents").then()
.log().all()
.statusCode(HttpStatus.SC_OK)
.body(equalTo(
data(linkage(type("parent"), id("1"))).toJSON()));
Expand Down Expand Up @@ -2162,7 +2161,6 @@ public void testNestedPatch() {
.body(req)
.patch("/parent")
.then()
.log().all()
.statusCode(HttpStatus.SC_OK)
.body(equalTo(expected));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ public void testBillingServiceInvocation() {
)
)
)
.log().all()
.post("/customerInvoice")
.then()
.log().all()
.statusCode(HttpStatus.SC_CREATED)
.body("data.id", equalTo("1"))
.body("data.attributes.total", equalTo(1100))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public void jsonApiGetTest() {
when()
.get("/json/stats?fields[stats]=measure")
.then()
.log().all()
.body(equalTo(
data(
resource(
Expand All @@ -50,7 +49,6 @@ public void jsonApiGetTest() {
)
).toJSON())
)
.log().all()
.statusCode(HttpStatus.SC_OK);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public void jsonApiGetTest() {
when()
.get("/json/group")
.then()
.log().all()
.body(equalTo(
data(
resource(
Expand All @@ -72,7 +71,6 @@ public void jsonApiGetTest() {
)
).toJSON())
)
.log().all()
.statusCode(HttpStatus.SC_OK);
}

Expand All @@ -99,7 +97,6 @@ public void jsonApiPatchTest() {
when()
.get("/json/group")
.then()
.log().all()
.body(equalTo(
data(
resource(
Expand All @@ -116,7 +113,6 @@ public void jsonApiPatchTest() {
)
).toJSON())
)
.log().all()
.statusCode(HttpStatus.SC_OK);
}

Expand Down Expand Up @@ -275,7 +271,6 @@ public void graphqlTestForbiddenCreate() {
)
).toQuery() + "\" }"
)
.log().all()
.when()
.post("/graphql")
.then()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ public class IntegrationTest {
@BeforeAll
public void setUp() {
RestAssured.port = port;
RestAssured.enableLoggingOfRequestAndResponseIfValidationFails();
}
}

0 comments on commit 00dc2bc

Please sign in to comment.