Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2341,20 +2341,21 @@ public void fusedNoConcurrentCleanDueToCancel() {
try {
final PublishProcessor<Integer> pp = PublishProcessor.create();

final AtomicReference<QueueSubscription<GroupedFlowable<Object, Integer>>> qs = new AtomicReference<QueueSubscription<GroupedFlowable<Object, Integer>>>();
final AtomicReference<QueueSubscription<GroupedFlowable<Integer, Integer>>> qs =
new AtomicReference<QueueSubscription<GroupedFlowable<Integer, Integer>>>();

final TestSubscriber<Integer> ts2 = new TestSubscriber<Integer>();

pp.groupBy(Functions.identity(), Functions.<Integer>identity(), false, 4)
.subscribe(new FlowableSubscriber<GroupedFlowable<Object, Integer>>() {
pp.groupBy(Functions.<Integer>identity(), Functions.<Integer>identity(), false, 4)
.subscribe(new FlowableSubscriber<GroupedFlowable<Integer, Integer>>() {

boolean once;

@Override
public void onNext(GroupedFlowable<Object, Integer> g) {
public void onNext(GroupedFlowable<Integer, Integer> g) {
if (!once) {
try {
GroupedFlowable<Object, Integer> t = qs.get().poll();
GroupedFlowable<Integer, Integer> t = qs.get().poll();
if (t != null) {
once = true;
t.subscribe(ts2);
Expand All @@ -2376,7 +2377,7 @@ public void onComplete() {
@Override
public void onSubscribe(Subscription s) {
@SuppressWarnings("unchecked")
QueueSubscription<GroupedFlowable<Object, Integer>> q = (QueueSubscription<GroupedFlowable<Object, Integer>>)s;
QueueSubscription<GroupedFlowable<Integer, Integer>> q = (QueueSubscription<GroupedFlowable<Integer, Integer>>)s;
qs.set(q);
q.requestFusion(QueueFuseable.ANY);
q.request(1);
Expand Down