File tree 1 file changed +9
-1
lines changed
src/test/java/com/ning/http/client/async 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 28
28
import java .io .ByteArrayOutputStream ;
29
29
import java .io .File ;
30
30
import java .io .IOException ;
31
+ import java .util .concurrent .ExecutionException ;
31
32
import java .util .concurrent .Future ;
32
33
33
34
import static junit .framework .Assert .assertTrue ;
@@ -253,7 +254,14 @@ public void testCloseMasterInvalidDerived() throws Exception {
253
254
derived .get ().get ();
254
255
fail ("Expected closed AHC" );
255
256
} catch (IOException e ) {
256
- // expected
257
+ // expected -- Seems to me that this behavior conflicts with the requirements of Future.get()
258
+ } catch (ExecutionException ee ) {
259
+ if (!(ee .getCause () instanceof IOException )) {
260
+ fail ("ExecutionException thrown, but the cause was not an instance of IOException." );
261
+ }
262
+ } catch (Throwable t ) {
263
+ fail ("Unexpected Exception thrown: " + t .toString ());
264
+ t .printStackTrace ();
257
265
}
258
266
}
259
267
You can’t perform that action at this time.
0 commit comments