@@ -40,9 +40,9 @@ class ProfilerTest extends Specification {
4040 def schema = TestUtil . schema(sdl, [Query : [
4141 hello : { DataFetchingEnvironment dfe -> return " world" } as DataFetcher
4242 ]])
43- def graphql = GraphQL . newGraphQL(schema). build();
43+ def graphql = GraphQL . newGraphQL(schema). build()
4444
45- ExecutionInput ei = ExecutionInput . newExecutionInput()
45+ ExecutionInput ei = newExecutionInput()
4646 .query(" { hello }" )
4747 .profileExecution(true )
4848 .build()
@@ -69,9 +69,9 @@ class ProfilerTest extends Specification {
6969 def schema = TestUtil . schema(sdl, [Query : [
7070 hello : { DataFetchingEnvironment dfe -> return " world" } as DataFetcher
7171 ]])
72- def graphql = GraphQL . newGraphQL(schema). build();
72+ def graphql = GraphQL . newGraphQL(schema). build()
7373
74- ExecutionInput ei = ExecutionInput . newExecutionInput()
74+ ExecutionInput ei = newExecutionInput()
7575 .query(" { hello __typename alias:__typename __schema {types{name}} __type(name: \" Query\" ) {name} }" )
7676 .profileExecution(true )
7777 .build()
@@ -99,9 +99,9 @@ class ProfilerTest extends Specification {
9999 def schema = TestUtil . schema(sdl, [Query : [
100100 hello : { DataFetchingEnvironment dfe -> return " world" } as DataFetcher
101101 ]])
102- def graphql = GraphQL . newGraphQL(schema). build();
102+ def graphql = GraphQL . newGraphQL(schema). build()
103103
104- ExecutionInput ei = ExecutionInput . newExecutionInput()
104+ ExecutionInput ei = newExecutionInput()
105105 .query(" { __schema {types{name}} __type(name: \" Query\" ) {name} }" )
106106 .profileExecution(true )
107107 .build()
@@ -153,9 +153,9 @@ class ProfilerTest extends Specification {
153153 dog : dogDf
154154 ]]
155155 def schema = TestUtil . schema(sdl, dfs)
156- def graphql = GraphQL . newGraphQL(schema). instrumentation(instrumentation). build();
156+ def graphql = GraphQL . newGraphQL(schema). instrumentation(instrumentation). build()
157157
158- ExecutionInput ei = ExecutionInput . newExecutionInput()
158+ ExecutionInput ei = newExecutionInput()
159159 .query(" { dog {name age} }" )
160160 .profileExecution(true )
161161 .build()
@@ -194,10 +194,10 @@ class ProfilerTest extends Specification {
194194 }
195195 }
196196
197- DataLoader<String , String > nameDataLoader = DataLoaderFactory . newDataLoader(batchLoader);
197+ DataLoader<String , String > nameDataLoader = DataLoaderFactory . newDataLoader(batchLoader)
198198
199- DataLoaderRegistry dataLoaderRegistry = new DataLoaderRegistry ();
200- dataLoaderRegistry. register(" name" , nameDataLoader);
199+ DataLoaderRegistry dataLoaderRegistry = new DataLoaderRegistry ()
200+ dataLoaderRegistry. register(" name" , nameDataLoader)
201201
202202 def df1 = { env ->
203203 def loader = env. getDataLoader(" name" )
@@ -251,10 +251,10 @@ class ProfilerTest extends Specification {
251251 }
252252 }
253253
254- DataLoader<String , String > nameDataLoader = DataLoaderFactory . newDataLoader(batchLoader);
254+ DataLoader<String , String > nameDataLoader = DataLoaderFactory . newDataLoader(batchLoader)
255255
256- DataLoaderRegistry dataLoaderRegistry = new DataLoaderRegistry ();
257- dataLoaderRegistry. register(" name" , nameDataLoader);
256+ DataLoaderRegistry dataLoaderRegistry = new DataLoaderRegistry ()
257+ dataLoaderRegistry. register(" name" , nameDataLoader)
258258
259259 def dogDF = { env ->
260260 def loader = env. getDataLoader(" name" )
@@ -307,17 +307,17 @@ class ProfilerTest extends Specification {
307307 def schema = TestUtil . schema(sdl, [Query : [
308308 hello : { DataFetchingEnvironment dfe -> return " world" } as DataFetcher
309309 ]])
310- Instrumentation fooInstrumentation = new Instrumentation () {};
311- Instrumentation barInstrumentation = new Instrumentation () {};
310+ Instrumentation fooInstrumentation = new Instrumentation () {}
311+ Instrumentation barInstrumentation = new Instrumentation () {}
312312 ChainedInstrumentation chainedInstrumentation = new ChainedInstrumentation (
313313 new ChainedInstrumentation (new SimplePerformantInstrumentation ()),
314314 new ChainedInstrumentation (fooInstrumentation, barInstrumentation),
315315 new SimplePerformantInstrumentation ())
316316
317317
318- def graphql = GraphQL . newGraphQL(schema). instrumentation(chainedInstrumentation). build();
318+ def graphql = GraphQL . newGraphQL(schema). instrumentation(chainedInstrumentation). build()
319319
320- ExecutionInput ei = ExecutionInput . newExecutionInput()
320+ ExecutionInput ei = newExecutionInput()
321321 .query(" { hello }" )
322322 .profileExecution(true )
323323 .build()
@@ -355,9 +355,9 @@ class ProfilerTest extends Specification {
355355 Foo : [
356356 bar : { DataFetchingEnvironment dfe -> dfe. source. id } as DataFetcher
357357 ]])
358- def graphql = GraphQL . newGraphQL(schema). build();
358+ def graphql = GraphQL . newGraphQL(schema). build()
359359
360- ExecutionInput ei = ExecutionInput . newExecutionInput()
360+ ExecutionInput ei = newExecutionInput()
361361 .query(" { foo { id bar } }" )
362362 .profileExecution(true )
363363 .build()
@@ -392,22 +392,22 @@ class ProfilerTest extends Specification {
392392 // blocking the engine for 1ms
393393 // so that engineTotalRunningTime time is more than 1ms
394394 Thread . sleep(1 )
395- return CompletableFuture . supplyAsync {
395+ return supplyAsync {
396396 Thread . sleep(500 )
397397 " 1"
398398 }
399399 } as DataFetcher ],
400400 Foo : [
401401 id : { DataFetchingEnvironment dfe ->
402- return CompletableFuture . supplyAsync {
402+ return supplyAsync {
403403 Thread . sleep(500 )
404404 dfe. source
405405 }
406406 } as DataFetcher
407407 ]])
408- def graphql = GraphQL . newGraphQL(schema). build();
408+ def graphql = GraphQL . newGraphQL(schema). build()
409409
410- ExecutionInput ei = ExecutionInput . newExecutionInput()
410+ ExecutionInput ei = newExecutionInput()
411411 .query(" { foo { id } }" )
412412 .profileExecution(true )
413413 .build()
@@ -456,10 +456,10 @@ class ProfilerTest extends Specification {
456456 } as DataFetcher
457457
458458 ]])
459- def graphql = GraphQL . newGraphQL(schema). build();
459+ def graphql = GraphQL . newGraphQL(schema). build()
460460
461461 ExecutionId id = ExecutionId . from(" myExecutionId" )
462- ExecutionInput ei = ExecutionInput . newExecutionInput()
462+ ExecutionInput ei = newExecutionInput()
463463 .query(" { foo { id name text } foo2: foo { id name text} }" )
464464 .profileExecution(true )
465465 .executionId(id)
@@ -480,9 +480,9 @@ class ProfilerTest extends Specification {
480480 " /foo2/text" : MATERIALIZED ,
481481 " /foo2" : COMPLETABLE_FUTURE_NOT_COMPLETED ,
482482 " /foo" : COMPLETABLE_FUTURE_NOT_COMPLETED ]
483- profilerResult. shortSummaryMap(). get(" dataFetcherResultTypes" ) == [" COMPLETABLE_FUTURE_COMPLETED" : " ( count:2, invocations:4) " ,
484- " COMPLETABLE_FUTURE_NOT_COMPLETED" : " ( count:2, invocations:2) " ,
485- " MATERIALIZED" : " ( count:2, invocations:4) " ]
483+ profilerResult. shortSummaryMap(). get(" dataFetcherResultTypes" ) == [" COMPLETABLE_FUTURE_COMPLETED" : [ " count" :2 , " invocations" : 4 ] ,
484+ " COMPLETABLE_FUTURE_NOT_COMPLETED" : [ " count" :2 , " invocations" : 2 ] ,
485+ " MATERIALIZED" : [ " count" :2 , " invocations" : 4 ] ]
486486 profilerResult. shortSummaryMap(). get(" executionId" ) == " myExecutionId"
487487 }
488488
@@ -496,9 +496,9 @@ class ProfilerTest extends Specification {
496496 def schema = TestUtil . schema(sdl, [Query : [
497497 hello : { DataFetchingEnvironment dfe -> return " world" } as DataFetcher
498498 ]])
499- def graphql = GraphQL . newGraphQL(schema). build();
499+ def graphql = GraphQL . newGraphQL(schema). build()
500500
501- ExecutionInput ei = ExecutionInput . newExecutionInput()
501+ ExecutionInput ei = newExecutionInput()
502502 .query(" query MyQuery { hello }" )
503503 .profileExecution(true )
504504 .build()
@@ -544,10 +544,10 @@ class ProfilerTest extends Specification {
544544 }
545545 }
546546
547- DataLoader<String , String > nameDataLoader = DataLoaderFactory . newDataLoader(batchLoader);
547+ DataLoader<String , String > nameDataLoader = DataLoaderFactory . newDataLoader(batchLoader)
548548
549- DataLoaderRegistry dataLoaderRegistry = new DataLoaderRegistry ();
550- dataLoaderRegistry. register(" name" , nameDataLoader);
549+ DataLoaderRegistry dataLoaderRegistry = new DataLoaderRegistry ()
550+ dataLoaderRegistry. register(" name" , nameDataLoader)
551551
552552 def dogDF = { env ->
553553 return env. getDataLoader(" name" ). load(" Key1" ). thenCompose {
0 commit comments