Skip to content

Commit e30bde7

Browse files
committed
fixup! fix: allow for providers to safely shutdown
Signed-off-by: Nicklas Lundin <nicklasl@spotify.com>
1 parent 08e5fc7 commit e30bde7

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/test/java/dev/openfeature/sdk/ProviderRepositoryTest.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -311,14 +311,16 @@ void shouldForceShutdownWhenExecutorDoesNotTerminateWithinTimeout() throws Excep
311311
FeatureProvider provider = createMockedProvider();
312312
AtomicBoolean wasInterrupted = new AtomicBoolean(false);
313313
doAnswer(invocation -> {
314-
try {
315-
Thread.sleep(TIMEOUT);
316-
} catch (InterruptedException e) {
317-
wasInterrupted.set(true);
318-
throw e;
319-
}
320-
return null;
321-
}).when(provider).shutdown();
314+
try {
315+
Thread.sleep(TIMEOUT);
316+
} catch (InterruptedException e) {
317+
wasInterrupted.set(true);
318+
throw e;
319+
}
320+
return null;
321+
})
322+
.when(provider)
323+
.shutdown();
322324

323325
setFeatureProvider(provider);
324326

0 commit comments

Comments
 (0)