File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/test/java/rx/internal/operators Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -837,12 +837,15 @@ public void switchAsyncHeavily() {
837
837
838
838
final Queue <Throwable > q = new ConcurrentLinkedQueue <Throwable >();
839
839
840
+ final long [] lastSeen = { 0L };
841
+
840
842
final int j = i ;
841
843
TestSubscriber <Integer > ts = new TestSubscriber <Integer >(i ) {
842
844
int count ;
843
845
@ Override
844
846
public void onNext (Integer t ) {
845
847
super .onNext (t );
848
+ lastSeen [0 ] = System .currentTimeMillis ();
846
849
if (++count == j ) {
847
850
count = 0 ;
848
851
requestMore (j );
@@ -867,13 +870,13 @@ public void call(Throwable e) {
867
870
.timeout (10 , TimeUnit .SECONDS )
868
871
.subscribe (ts );
869
872
870
- ts .awaitTerminalEvent (30 , TimeUnit .SECONDS );
873
+ ts .awaitTerminalEvent (45 , TimeUnit .SECONDS );
871
874
if (!q .isEmpty ()) {
872
875
throw new AssertionError ("Dropped exceptions" , new CompositeException (q ));
873
876
}
874
877
ts .assertNoErrors ();
875
878
if (ts .getOnCompletedEvents ().size () == 0 ) {
876
- fail ("switchAsyncHeavily timed out @ " + j + " (" + ts .getOnNextEvents ().size () + " onNexts received) " );
879
+ fail ("switchAsyncHeavily timed out @ " + j + " (" + ts .getOnNextEvents ().size () + " onNexts received, last was " + ( System . currentTimeMillis () - lastSeen [ 0 ]) + " ms ago " );
877
880
}
878
881
}
879
882
}
You can’t perform that action at this time.
0 commit comments