We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dbd622 commit b816546Copy full SHA for b816546
src/test/java/javascalautils/concurrent/TestPromiseImpl.java
@@ -165,6 +165,17 @@ public void tryFailure_twice() {
165
assertFalse(promise.tryFailure(new Exception("Scheit, another exception")));
166
}
167
168
+ @Test
169
+ public void future_listenerThrowsExceptionOnComplete() {
170
+ promise.future().onSuccess(s -> {
171
+ //simulates an application that misbehaves and throws an exception when in the event/result listener
172
+ throw new NullPointerException("Null sucks!!!");
173
+ });
174
+
175
+ //should yield nothing to us even though the result listener throws an exception
176
+ promise.success("Yippikaye!!!");
177
+ }
178
179
@Test
180
public void t_toString() {
181
assertNotNull(promise.toString());
0 commit comments