Skip to content

Commit

Permalink
formatting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dariuszkuc committed Jan 21, 2024
1 parent 3a8290f commit 110b14d
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ void setupSchema() {
void testTracing() throws InvalidProtocolBufferException {
Map<String, Object> result =
graphql
.execute(createExecutionInput("{ widgets { foo, baz: bar }, listOfLists { foo }, listOfScalars }"))
.execute(
createExecutionInput(
"{ widgets { foo, baz: bar }, listOfLists { foo }, listOfScalars }"))
.toSpecification();

Object extensions = result.get("extensions");
Expand Down Expand Up @@ -173,7 +175,8 @@ void testTracing() throws InvalidProtocolBufferException {

@Test
void testTracingParseErrors() throws InvalidProtocolBufferException {
Map<String, Object> result = graphql.execute(createExecutionInput("{ widgets { foo }")).toSpecification();
Map<String, Object> result =
graphql.execute(createExecutionInput("{ widgets { foo }")).toSpecification();

Object extensions = result.get("extensions");
assertTrue(extensions instanceof Map);
Expand All @@ -192,7 +195,8 @@ void testTracingParseErrors() throws InvalidProtocolBufferException {

@Test
void testTracingValidationErrors() throws InvalidProtocolBufferException {
Map<String, Object> result = graphql.execute(createExecutionInput("{ widgets { notARealThing } }")).toSpecification();
Map<String, Object> result =
graphql.execute(createExecutionInput("{ widgets { notARealThing } }")).toSpecification();

Object extensions = result.get("extensions");
assertTrue(extensions instanceof Map);
Expand Down Expand Up @@ -265,7 +269,8 @@ void testTracingWithGraphQLContextMap() {

Map<String, Object> result = graphql.execute(input).toSpecification();
Object extensions = result.get("extensions");
// Because the special header isn't there, we fallback to the default behavior of not generating ftv1
// Because the special header isn't there, we fallback to the default behavior of not generating
// ftv1
assertNull(extensions);

// Try again with the header having the wrong value.
Expand All @@ -287,7 +292,7 @@ void testTracingWithGraphQLContextMap() {

private static ExecutionInput createExecutionInput(String query) {
return ExecutionInput.newExecutionInput(query)
.graphQLContext(Map.of(FEDERATED_TRACING_HEADER_NAME, FEDERATED_TRACING_HEADER_VALUE))
.build();
.graphQLContext(Map.of(FEDERATED_TRACING_HEADER_NAME, FEDERATED_TRACING_HEADER_VALUE))
.build();
}
}

0 comments on commit 110b14d

Please sign in to comment.