Skip to content

Commit 866fa5c

Browse files
hiddewiefedericorispo
authored andcommitted
Remove undead code from DataLoaderDispatchingSpec
1 parent 79ee816 commit 866fa5c

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

graphql-java-servlet/src/test/groovy/graphql/kickstart/servlet/DataLoaderDispatchingSpec.groovy

-21
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ class DataLoaderDispatchingSpec extends Specification {
117117
mapper.readValue(response.getContentAsByteArray(), List)
118118
}
119119

120-
Instrumentation simpleInstrumentation = new SimplePerformantInstrumentation()
121-
ChainedInstrumentation chainedInstrumentation = new ChainedInstrumentation(Collections.singletonList(simpleInstrumentation))
122-
def simpleSupplier = { simpleInstrumentation }
123-
def chainedSupplier = { chainedInstrumentation }
124-
125120
def "batched query with per query context does not batch loads together"() {
126121
setup:
127122
configureServlet(ContextSetting.PER_QUERY)
@@ -173,20 +168,4 @@ class DataLoaderDispatchingSpec extends Specification {
173168
fetchCounterC.get() == 1
174169
loadCounterC.get() == 2
175170
}
176-
177-
def unwrapChainedInstrumentations(Instrumentation instrumentation) {
178-
if (!instrumentation instanceof ChainedInstrumentation) {
179-
return Collections.singletonList(instrumentation)
180-
} else {
181-
List<Instrumentation> instrumentations = new ArrayList<>()
182-
for (Instrumentation current : ((ChainedInstrumentation) instrumentation).getInstrumentations()) {
183-
if (current instanceof ChainedInstrumentation) {
184-
instrumentations.addAll(unwrapChainedInstrumentations(current))
185-
} else {
186-
instrumentations.add(current)
187-
}
188-
}
189-
return instrumentations
190-
}
191-
}
192171
}

0 commit comments

Comments
 (0)