Skip to content

Commit 5a226d0

Browse files
committed
Increase coverage
1 parent b059c10 commit 5a226d0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

graphql-java-servlet/src/main/java/graphql/kickstart/servlet/OsgiGraphQLHttpServlet.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ protected void updateSchema() {
131131
updateFuture.cancel(true);
132132
}
133133

134-
updateFuture = executor
135-
.schedule(this::doUpdateSchema, schemaUpdateDelay, TimeUnit.MILLISECONDS);
134+
updateFuture = executor.schedule(this::doUpdateSchema, schemaUpdateDelay, TimeUnit.MILLISECONDS);
136135
}
137136
}
138137

graphql-java-servlet/src/test/groovy/graphql/kickstart/servlet/cache/CacheReaderTest.groovy

+11
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,15 @@ class CacheReaderTest extends Specification {
7070
1 * response.setContentLength(3)
7171
1 * outputStream.write([ 00, 01, 02 ])
7272
}
73+
74+
def "should return false if exception is thrown"() {
75+
given:
76+
cacheManager.get(request, invocationInput) >> {throw new RuntimeException()}
77+
78+
when:
79+
def result = cacheReader.responseFromCache(invocationInput, request, response, cacheManager)
80+
81+
then:
82+
!result
83+
}
7384
}

0 commit comments

Comments
 (0)