Skip to content

Commit

Permalink
Random Async/TableExport IT failure fix (#1974)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Klish <[email protected]>
  • Loading branch information
moizarafat and aklish authored Mar 30, 2021
1 parent 4c33506 commit 3abe188
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ public void graphQLHappyPath1() throws InterruptedException {
selections(
field("id"),
field("query"),
field("queryType"),
field("status")
field("queryType")
)
)
)
Expand All @@ -214,7 +213,7 @@ public void graphQLHappyPath1() throws InterruptedException {

String expectedResponse = "{\"data\":{\"asyncQuery\":{\"edges\":[{\"node\":{\"id\":\"edc4a871-dff2-4054-804e-d80075cf828e\","
+ "\"query\":\"{\\\"query\\\":\\\"{ book { edges { node { id title } } } }\\\",\\\"variables\\\":null}\","
+ "\"queryType\":\"GRAPHQL_V1_0\",\"status\":\"PROCESSING\"}}]}}}";
+ "\"queryType\":\"GRAPHQL_V1_0\"}}]}}}";
JsonNode graphQLJsonNode = toJsonNode(graphQLRequest, null);
given()
.contentType(MediaType.APPLICATION_JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ public void graphQLHappyPath1() throws InterruptedException, IOException {
field("id"),
field("query"),
field("queryType"),
field("status"),
field("resultType")
)
)
Expand All @@ -254,7 +253,7 @@ public void graphQLHappyPath1() throws InterruptedException, IOException {

String expectedResponse = "{\"data\":{\"tableExport\":{\"edges\":[{\"node\":{\"id\":\"edc4a871-dff2-4054-804e-d80075cf828e\","
+ "\"query\":\"{\\\"query\\\":\\\"{ book { edges { node { title } } } }\\\",\\\"variables\\\":null}\","
+ "\"queryType\":\"GRAPHQL_V1_0\",\"status\":\"PROCESSING\",\"resultType\":\"CSV\"}}]}}}";
+ "\"queryType\":\"GRAPHQL_V1_0\",\"resultType\":\"CSV\"}}]}}}";
JsonNode graphQLJsonNode = toJsonNode(graphQLRequest, null);
given()
.contentType(MediaType.APPLICATION_JSON)
Expand Down Expand Up @@ -380,7 +379,6 @@ public void graphQLHappyPath1Alias() throws InterruptedException, IOException {
field("id"),
field("query"),
field("queryType"),
field("status"),
field("resultType")
)
)
Expand All @@ -390,7 +388,7 @@ public void graphQLHappyPath1Alias() throws InterruptedException, IOException {

String expectedResponse = "{\"data\":{\"tableExport\":{\"edges\":[{\"node\":{\"id\":\"edc4a871-dff2-4054-804e-d80075cab28e\","
+ "\"query\":\"{\\\"query\\\":\\\"{ book { edges { node { bookName:title } } } }\\\",\\\"variables\\\":null}\","
+ "\"queryType\":\"GRAPHQL_V1_0\",\"status\":\"PROCESSING\",\"resultType\":\"CSV\"}}]}}}";
+ "\"queryType\":\"GRAPHQL_V1_0\",\"resultType\":\"CSV\"}}]}}}";
JsonNode graphQLJsonNode = toJsonNode(graphQLRequest, null);
given()
.contentType(MediaType.APPLICATION_JSON)
Expand Down Expand Up @@ -847,7 +845,6 @@ public void graphQLBadExportQueryFail() throws InterruptedException {
field("id"),
field("query"),
field("queryType"),
field("status"),
field("resultType")
)
)
Expand All @@ -857,7 +854,7 @@ public void graphQLBadExportQueryFail() throws InterruptedException {

String expectedResponse = "{\"data\":{\"tableExport\":{\"edges\":[{\"node\":{\"id\":\"edc4a871-dff2-4054-804e-d80075df828e\","
+ "\"query\":\"{\\\"query\\\":\\\"{ book { edges { node { title } } }\\\",\\\"variables\\\":null}\","
+ "\"queryType\":\"GRAPHQL_V1_0\",\"status\":\"PROCESSING\",\"resultType\":\"CSV\"}}]}}}";
+ "\"queryType\":\"GRAPHQL_V1_0\",\"resultType\":\"CSV\"}}]}}}";
JsonNode graphQLJsonNode = toJsonNode(graphQLRequest, null);
given()
.contentType(MediaType.APPLICATION_JSON)
Expand Down Expand Up @@ -905,7 +902,6 @@ public void graphQLMultipleQueryFail() throws InterruptedException {
field("id"),
field("query"),
field("queryType"),
field("status"),
field("resultType")
)
)
Expand All @@ -915,7 +911,7 @@ public void graphQLMultipleQueryFail() throws InterruptedException {

String expectedResponse = "{\"data\":{\"tableExport\":{\"edges\":[{\"node\":{\"id\":\"edc4a871-def2-4054-804e-d80075cf828e\","
+ "\"query\":\"{\\\"query\\\":\\\"{ book { edges { node { title } } } author { edges { node { name } } } }\\\",\\\"variables\\\":null}\","
+ "\"queryType\":\"GRAPHQL_V1_0\",\"status\":\"PROCESSING\",\"resultType\":\"CSV\"}}]}}}";
+ "\"queryType\":\"GRAPHQL_V1_0\",\"resultType\":\"CSV\"}}]}}}";
JsonNode graphQLJsonNode = toJsonNode(graphQLRequest, null);
given()
.contentType(MediaType.APPLICATION_JSON)
Expand Down Expand Up @@ -963,7 +959,6 @@ public void graphQLMultipleProjectionFail() throws InterruptedException {
field("id"),
field("query"),
field("queryType"),
field("status"),
field("resultType")
)
)
Expand All @@ -973,7 +968,7 @@ public void graphQLMultipleProjectionFail() throws InterruptedException {

String expectedResponse = "{\"data\":{\"tableExport\":{\"edges\":[{\"node\":{\"id\":\"edc4a871-daf2-4054-804e-d80075cf828e\","
+ "\"query\":\"{\\\"query\\\":\\\"{ book { edges { node { title } } } } { author { edges { node { name } } } }\\\",\\\"variables\\\":null}\","
+ "\"queryType\":\"GRAPHQL_V1_0\",\"status\":\"PROCESSING\",\"resultType\":\"CSV\"}}]}}}";
+ "\"queryType\":\"GRAPHQL_V1_0\",\"resultType\":\"CSV\"}}]}}}";
JsonNode graphQLJsonNode = toJsonNode(graphQLRequest, null);
given()
.contentType(MediaType.APPLICATION_JSON)
Expand Down Expand Up @@ -1021,7 +1016,6 @@ public void graphQLRelationshipFetchFail() throws InterruptedException {
field("id"),
field("query"),
field("queryType"),
field("status"),
field("resultType")
)
)
Expand All @@ -1031,7 +1025,7 @@ public void graphQLRelationshipFetchFail() throws InterruptedException {

String expectedResponse = "{\"data\":{\"tableExport\":{\"edges\":[{\"node\":{\"id\":\"edc4a871-dbf2-4054-804e-d80075cf828e\","
+ "\"query\":\"{\\\"query\\\":\\\"{ book { edges { node { title authors {edges { node { name } } } } } } }\\\", \\\"variables\\\":null}\","
+ "\"queryType\":\"GRAPHQL_V1_0\",\"status\":\"PROCESSING\",\"resultType\":\"CSV\"}}]}}}";
+ "\"queryType\":\"GRAPHQL_V1_0\",\"resultType\":\"CSV\"}}]}}}";
JsonNode graphQLJsonNode = toJsonNode(graphQLRequest, null);
given()
.contentType(MediaType.APPLICATION_JSON)
Expand Down

0 comments on commit 3abe188

Please sign in to comment.