Skip to content

Commit

Permalink
Remove undead code from DataLoaderDispatchingSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie authored and federicorispo committed Jul 28, 2024
1 parent 79ee816 commit 866fa5c
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ class DataLoaderDispatchingSpec extends Specification {
mapper.readValue(response.getContentAsByteArray(), List)
}

Instrumentation simpleInstrumentation = new SimplePerformantInstrumentation()
ChainedInstrumentation chainedInstrumentation = new ChainedInstrumentation(Collections.singletonList(simpleInstrumentation))
def simpleSupplier = { simpleInstrumentation }
def chainedSupplier = { chainedInstrumentation }

def "batched query with per query context does not batch loads together"() {
setup:
configureServlet(ContextSetting.PER_QUERY)
Expand Down Expand Up @@ -173,20 +168,4 @@ class DataLoaderDispatchingSpec extends Specification {
fetchCounterC.get() == 1
loadCounterC.get() == 2
}

def unwrapChainedInstrumentations(Instrumentation instrumentation) {
if (!instrumentation instanceof ChainedInstrumentation) {
return Collections.singletonList(instrumentation)
} else {
List<Instrumentation> instrumentations = new ArrayList<>()
for (Instrumentation current : ((ChainedInstrumentation) instrumentation).getInstrumentations()) {
if (current instanceof ChainedInstrumentation) {
instrumentations.addAll(unwrapChainedInstrumentations(current))
} else {
instrumentations.add(current)
}
}
return instrumentations
}
}
}

0 comments on commit 866fa5c

Please sign in to comment.