File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
rxjava-core/src/test/java/rx/util Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public class CompositeExceptionTest {
31
31
private final CompositeException compositeEx ;
32
32
33
33
public CompositeExceptionTest () {
34
+ ex1 .initCause (ex2 );
34
35
List <Throwable > throwables = new ArrayList <Throwable >();
35
36
throwables .add (ex1 );
36
37
throwables .add (ex2 );
@@ -67,4 +68,12 @@ public void testAttachCallingThreadStackAddCompositeToItself() {
67
68
CompositeException .attachCallingThreadStack (compositeEx , compositeEx );
68
69
assertEquals (CompositeException .CompositeExceptionCausalChain .MESSAGE , compositeEx .getCause ().getMessage ());
69
70
}
71
+
72
+ @ Test
73
+ public void testAttachCallingThreadStackAddExceptionsToEachOther () {
74
+ CompositeException .attachCallingThreadStack (ex1 , ex2 );
75
+ CompositeException .attachCallingThreadStack (ex2 , ex1 );
76
+ assertEquals ("Ex2" , ex1 .getCause ().getMessage ());
77
+ assertEquals ("Ex1" , ex2 .getCause ().getMessage ());
78
+ }
70
79
}
You can’t perform that action at this time.
0 commit comments