| 1 |
/* |
| 2 |
* Copyright (c) 2016-present, RxJava Contributors. |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in |
| 5 |
* compliance with the License. You may obtain a copy of the License at |
| 6 |
* |
| 7 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
* |
| 9 |
* Unless required by applicable law or agreed to in writing, software distributed under the License is |
| 10 |
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See |
| 11 |
* the License for the specific language governing permissions and limitations under the License. |
| 12 |
*/ |
| 13 |
|
| 14 |
package io.reactivex.rxjava3.internal.operators.observable; |
| 15 |
|
| 16 |
import static org.junit.Assert.*; |
| 17 |
import static org.mockito.ArgumentMatchers.*; |
| 18 |
import static org.mockito.Mockito.*; |
| 19 |
|
| 20 |
import java.util.List; |
| 21 |
import java.util.concurrent.TimeUnit; |
| 22 |
import java.util.concurrent.atomic.AtomicReference; |
| 23 |
|
| 24 |
import org.junit.*; |
| 25 |
import org.mockito.InOrder; |
| 26 |
import org.reactivestreams.Publisher; |
| 27 |
|
| 28 |
import io.reactivex.rxjava3.core.*; |
| 29 |
import io.reactivex.rxjava3.disposables.*; |
| 30 |
import io.reactivex.rxjava3.exceptions.TestException; |
| 31 |
import io.reactivex.rxjava3.functions.Function; |
| 32 |
import io.reactivex.rxjava3.internal.functions.Functions; |
| 33 |
import io.reactivex.rxjava3.internal.operators.observable.ObservableDebounceTimed.*; |
| 34 |
import io.reactivex.rxjava3.observers.TestObserver; |
| 35 |
import io.reactivex.rxjava3.plugins.RxJavaPlugins; |
| 36 |
import io.reactivex.rxjava3.schedulers.TestScheduler; |
| 37 |
import io.reactivex.rxjava3.subjects.*; |
| 38 |
import io.reactivex.rxjava3.testsupport.*; |
| 39 |
|
| 40 |
public class ObservableDebounceTest extends RxJavaTest { |
| 41 |
|
| 42 |
private TestScheduler scheduler; |
| 43 |
private Observer<String> observer; |
| 44 |
private Scheduler.Worker innerScheduler; |
| 45 |
|
| 46 |
@Before |
| 47 |
public void before() { |
| 48 |
scheduler = new TestScheduler(); |
| 49 |
observer = TestHelper.mockObserver(); |
| 50 |
innerScheduler = scheduler.createWorker(); |
| 51 |
} |
| 52 |
|
| 53 |
@Test |
| 54 |
public void debounceWithCompleted() { |
| 55 |
Observable<String> source = Observable.unsafeCreate(new ObservableSource<String>() { |
| 56 |
@Override |
| 57 |
public void subscribe(Observer<? super String> observer) { |
| 58 |
observer.onSubscribe(Disposable.empty()); |
| 59 |
publishNext(observer, 100, "one"); // Should be skipped since "two" will arrive before the timeout expires. |
| 60 |
publishNext(observer, 400, "two"); // Should be published since "three" will arrive after the timeout expires. |
| 61 |
publishNext(observer, 900, "three"); // Should be skipped since onComplete will arrive before the timeout expires. |
| 62 |
publishCompleted(observer, 1000); // Should be published as soon as the timeout expires. |
| 63 |
} |
| 64 |
}); |
| 65 |
|
| 66 |
Observable<String> sampled = source.debounce(400, TimeUnit.MILLISECONDS, scheduler); |
| 67 |
sampled.subscribe(observer); |
| 68 |
|
| 69 |
scheduler.advanceTimeTo(0, TimeUnit.MILLISECONDS); |
| 70 |
InOrder inOrder = inOrder(observer); |
| 71 |
// must go to 800 since it must be 400 after when two is sent, which is at 400 |
| 72 |
scheduler.advanceTimeTo(800, TimeUnit.MILLISECONDS); |
| 73 |
inOrder.verify(observer, times(1)).onNext("two"); |
| 74 |
scheduler.advanceTimeTo(1000, TimeUnit.MILLISECONDS); |
| 75 |
inOrder.verify(observer, times(1)).onComplete(); |
| 76 |
inOrder.verifyNoMoreInteractions(); |
| 77 |
} |
| 78 |
|
| 79 |
@Test |
| 80 |
public void debounceNeverEmits() { |
| 81 |
Observable<String> source = Observable.unsafeCreate(new ObservableSource<String>() { |
| 82 |
@Override |
| 83 |
public void subscribe(Observer<? super String> observer) { |
| 84 |
observer.onSubscribe(Disposable.empty()); |
| 85 |
// all should be skipped since they are happening faster than the 200ms timeout |
| 86 |
publishNext(observer, 100, "a"); // Should be skipped |
| 87 |
publishNext(observer, 200, "b"); // Should be skipped |
| 88 |
publishNext(observer, 300, "c"); // Should be skipped |
| 89 |
publishNext(observer, 400, "d"); // Should be skipped |
| 90 |
publishNext(observer, 500, "e"); // Should be skipped |
| 91 |
publishNext(observer, 600, "f"); // Should be skipped |
| 92 |
publishNext(observer, 700, "g"); // Should be skipped |
| 93 |
publishNext(observer, 800, "h"); // Should be skipped |
| 94 |
publishCompleted(observer, 900); // Should be published as soon as the timeout expires. |
| 95 |
} |
| 96 |
}); |
| 97 |
|
| 98 |
Observable<String> sampled = source.debounce(200, TimeUnit.MILLISECONDS, scheduler); |
| 99 |
sampled.subscribe(observer); |
| 100 |
|
| 101 |
scheduler.advanceTimeTo(0, TimeUnit.MILLISECONDS); |
| 102 |
InOrder inOrder = inOrder(observer); |
| 103 |
inOrder.verify(observer, times(0)).onNext(anyString()); |
| 104 |
scheduler.advanceTimeTo(1000, TimeUnit.MILLISECONDS); |
| 105 |
inOrder.verify(observer, times(1)).onComplete(); |
| 106 |
inOrder.verifyNoMoreInteractions(); |
| 107 |
} |
| 108 |
|
| 109 |
@Test |
| 110 |
public void debounceWithError() { |
| 111 |
Observable<String> source = Observable.unsafeCreate(new ObservableSource<String>() { |
| 112 |
@Override |
| 113 |
public void subscribe(Observer<? super String> observer) { |
| 114 |
observer.onSubscribe(Disposable.empty()); |
| 115 |
Exception error = new TestException(); |
| 116 |
publishNext(observer, 100, "one"); // Should be published since "two" will arrive after the timeout expires. |
| 117 |
publishNext(observer, 600, "two"); // Should be skipped since onError will arrive before the timeout expires. |
| 118 |
publishError(observer, 700, error); // Should be published as soon as the timeout expires. |
| 119 |
} |
| 120 |
}); |
| 121 |
|
| 122 |
Observable<String> sampled = source.debounce(400, TimeUnit.MILLISECONDS, scheduler); |
| 123 |
sampled.subscribe(observer); |
| 124 |
|
| 125 |
scheduler.advanceTimeTo(0, TimeUnit.MILLISECONDS); |
| 126 |
InOrder inOrder = inOrder(observer); |
| 127 |
// 100 + 400 means it triggers at 500 |
| 128 |
scheduler.advanceTimeTo(500, TimeUnit.MILLISECONDS); |
| 129 |
inOrder.verify(observer).onNext("one"); |
| 130 |
scheduler.advanceTimeTo(701, TimeUnit.MILLISECONDS); |
| 131 |
inOrder.verify(observer).onError(any(TestException.class)); |
| 132 |
inOrder.verifyNoMoreInteractions(); |
| 133 |
} |
| 134 |
|
| 135 |
private <T> void publishCompleted(final Observer<T> observer, long delay) { |
| 136 |
innerScheduler.schedule(new Runnable() { |
| 137 |
@Override |
| 138 |
public void run() { |
| 139 |
observer.onComplete(); |
| 140 |
} |
| 141 |
}, delay, TimeUnit.MILLISECONDS); |
| 142 |
} |
| 143 |
|
| 144 |
private <T> void publishError(final Observer<T> observer, long delay, final Exception error) { |
| 145 |
innerScheduler.schedule(new Runnable() { |
| 146 |
@Override |
| 147 |
public void run() { |
| 148 |
observer.onError(error); |
| 149 |
} |
| 150 |
}, delay, TimeUnit.MILLISECONDS); |
| 151 |
} |
| 152 |
|
| 153 |
private <T> void publishNext(final Observer<T> observer, final long delay, final T value) { |
| 154 |
innerScheduler.schedule(new Runnable() { |
| 155 |
@Override |
| 156 |
public void run() { |
| 157 |
observer.onNext(value); |
| 158 |
} |
| 159 |
}, delay, TimeUnit.MILLISECONDS); |
| 160 |
} |
| 161 |
|
| 162 |
@Test |
| 163 |
public void debounceSelectorNormal1() { |
| 164 |
PublishSubject<Integer> source = PublishSubject.create(); |
| 165 |
final PublishSubject<Integer> debouncer = PublishSubject.create(); |
| 166 |
Function<Integer, Observable<Integer>> debounceSel = new Function<Integer, Observable<Integer>>() { |
| 167 |
|
| 168 |
@Override |
| 169 |
public Observable<Integer> apply(Integer t1) { |
| 170 |
return debouncer; |
| 171 |
} |
| 172 |
}; |
| 173 |
|
| 174 |
Observer<Object> o = TestHelper.mockObserver(); |
| 175 |
InOrder inOrder = inOrder(o); |
| 176 |
|
| 177 |
source.debounce(debounceSel).subscribe(o); |
| 178 |
|
| 179 |
source.onNext(1); |
| 180 |
debouncer.onNext(1); |
| 181 |
|
| 182 |
source.onNext(2); |
| 183 |
source.onNext(3); |
| 184 |
source.onNext(4); |
| 185 |
|
| 186 |
debouncer.onNext(2); |
| 187 |
|
| 188 |
source.onNext(5); |
| 189 |
source.onComplete(); |
| 190 |
|
| 191 |
inOrder.verify(o).onNext(1); |
| 192 |
inOrder.verify(o).onNext(4); |
| 193 |
inOrder.verify(o).onNext(5); |
| 194 |
inOrder.verify(o).onComplete(); |
| 195 |
|
| 196 |
verify(o, never()).onError(any(Throwable.class)); |
| 197 |
} |
| 198 |
|
| 199 |
@Test |
| 200 |
public void debounceSelectorFuncThrows() { |
| 201 |
PublishSubject<Integer> source = PublishSubject.create(); |
| 202 |
Function<Integer, Observable<Integer>> debounceSel = new Function<Integer, Observable<Integer>>() { |
| 203 |
|
| 204 |
@Override |
| 205 |
public Observable<Integer> apply(Integer t1) { |
| 206 |
throw new TestException(); |
| 207 |
} |
| 208 |
}; |
| 209 |
|
| 210 |
Observer<Object> o = TestHelper.mockObserver(); |
| 211 |
|
| 212 |
source.debounce(debounceSel).subscribe(o); |
| 213 |
|
| 214 |
source.onNext(1); |
| 215 |
|
| 216 |
verify(o, never()).onNext(any()); |
| 217 |
verify(o, never()).onComplete(); |
| 218 |
verify(o).onError(any(TestException.class)); |
| 219 |
} |
| 220 |
|
| 221 |
@Test |
| 222 |
public void debounceSelectorObservableThrows() { |
| 223 |
PublishSubject<Integer> source = PublishSubject.create(); |
| 224 |
Function<Integer, Observable<Integer>> debounceSel = new Function<Integer, Observable<Integer>>() { |
| 225 |
|
| 226 |
@Override |
| 227 |
public Observable<Integer> apply(Integer t1) { |
| 228 |
return Observable.error(new TestException()); |
| 229 |
} |
| 230 |
}; |
| 231 |
|
| 232 |
Observer<Object> o = TestHelper.mockObserver(); |
| 233 |
|
| 234 |
source.debounce(debounceSel).subscribe(o); |
| 235 |
|
| 236 |
source.onNext(1); |
| 237 |
|
| 238 |
verify(o, never()).onNext(any()); |
| 239 |
verify(o, never()).onComplete(); |
| 240 |
verify(o).onError(any(TestException.class)); |
| 241 |
} |
| 242 |
|
| 243 |
@Test |
| 244 |
public void debounceTimedLastIsNotLost() { |
| 245 |
PublishSubject<Integer> source = PublishSubject.create(); |
| 246 |
|
| 247 |
Observer<Object> o = TestHelper.mockObserver(); |
| 248 |
|
| 249 |
source.debounce(100, TimeUnit.MILLISECONDS, scheduler).subscribe(o); |
| 250 |
|
| 251 |
source.onNext(1); |
| 252 |
source.onComplete(); |
| 253 |
|
| 254 |
scheduler.advanceTimeBy(1, TimeUnit.SECONDS); |
| 255 |
|
| 256 |
verify(o).onNext(1); |
| 257 |
verify(o).onComplete(); |
| 258 |
verify(o, never()).onError(any(Throwable.class)); |
| 259 |
} |
| 260 |
|
| 261 |
@Test |
| 262 |
public void debounceSelectorLastIsNotLost() { |
| 263 |
PublishSubject<Integer> source = PublishSubject.create(); |
| 264 |
final PublishSubject<Integer> debouncer = PublishSubject.create(); |
| 265 |
|
| 266 |
Function<Integer, Observable<Integer>> debounceSel = new Function<Integer, Observable<Integer>>() { |
| 267 |
|
| 268 |
@Override |
| 269 |
public Observable<Integer> apply(Integer t1) { |
| 270 |
return debouncer; |
| 271 |
} |
| 272 |
}; |
| 273 |
|
| 274 |
Observer<Object> o = TestHelper.mockObserver(); |
| 275 |
|
| 276 |
source.debounce(debounceSel).subscribe(o); |
| 277 |
|
| 278 |
source.onNext(1); |
| 279 |
source.onComplete(); |
| 280 |
|
| 281 |
debouncer.onComplete(); |
| 282 |
|
| 283 |
verify(o).onNext(1); |
| 284 |
verify(o).onComplete(); |
| 285 |
verify(o, never()).onError(any(Throwable.class)); |
| 286 |
} |
| 287 |
|
| 288 |
@Test |
| 289 |
public void debounceWithTimeBackpressure() throws InterruptedException { |
| 290 |
TestScheduler scheduler = new TestScheduler(); |
| 291 |
TestObserverEx<Integer> observer = new TestObserverEx<>(); |
| 292 |
|
| 293 |
Observable.merge( |
| 294 |
Observable.just(1), |
| 295 |
Observable.just(2).delay(10, TimeUnit.MILLISECONDS, scheduler) |
| 296 |
).debounce(20, TimeUnit.MILLISECONDS, scheduler).take(1).subscribe(observer); |
| 297 |
|
| 298 |
scheduler.advanceTimeBy(30, TimeUnit.MILLISECONDS); |
| 299 |
|
| 300 |
observer.assertValue(2); |
| 301 |
observer.assertTerminated(); |
| 302 |
observer.assertNoErrors(); |
| 303 |
} |
| 304 |
|
| 305 |
@Test |
| 306 |
public void debounceDefault() throws Exception { |
| 307 |
|
| 308 |
Observable.just(1).debounce(1, TimeUnit.SECONDS) |
| 309 |
.test() |
| 310 |
.awaitDone(5, TimeUnit.SECONDS) |
| 311 |
.assertResult(1); |
| 312 |
} |
| 313 |
|
| 314 |
@Test |
| 315 |
public void dispose() { |
| 316 |
TestHelper.checkDisposed(PublishSubject.create().debounce(1, TimeUnit.SECONDS, new TestScheduler())); |
| 317 |
|
| 318 |
TestHelper.checkDisposed(PublishSubject.create().debounce(Functions.justFunction(Observable.never()))); |
| 319 |
|
| 320 |
Disposable d = new ObservableDebounceTimed.DebounceEmitter<>(1, 1, null); |
| 321 |
assertFalse(d.isDisposed()); |
| 322 |
|
| 323 |
d.dispose(); |
| 324 |
|
| 325 |
assertTrue(d.isDisposed()); |
| 326 |
} |
| 327 |
|
| 328 |
@Test |
| 329 |
public void badSource() { |
| 330 |
List<Throwable> errors = TestHelper.trackPluginErrors(); |
| 331 |
try { |
| 332 |
new Observable<Integer>() { |
| 333 |
@Override |
| 334 |
protected void subscribeActual(Observer<? super Integer> observer) { |
| 335 |
observer.onSubscribe(Disposable.empty()); |
| 336 |
observer.onComplete(); |
| 337 |
observer.onNext(1); |
| 338 |
observer.onError(new TestException()); |
| 339 |
observer.onComplete(); |
| 340 |
} |
| 341 |
} |
| 342 |
.debounce(1, TimeUnit.SECONDS, new TestScheduler()) |
| 343 |
.test() |
| 344 |
.assertResult(); |
| 345 |
|
| 346 |
TestHelper.assertUndeliverable(errors, 0, TestException.class); |
| 347 |
} finally { |
| 348 |
RxJavaPlugins.reset(); |
| 349 |
} |
| 350 |
} |
| 351 |
|
| 352 |
@Test |
| 353 |
public void badSourceSelector() { |
| 354 |
TestHelper.checkBadSourceObservable(new Function<Observable<Integer>, Object>() { |
| 355 |
@Override |
| 356 |
public Object apply(Observable<Integer> o) throws Exception { |
| 357 |
return o.debounce(new Function<Integer, ObservableSource<Long>>() { |
| 358 |
@Override |
| 359 |
public ObservableSource<Long> apply(Integer v) throws Exception { |
| 360 |
return Observable.timer(1, TimeUnit.SECONDS); |
| 361 |
} |
| 362 |
}); |
| 363 |
} |
| 364 |
}, false, 1, 1, 1); |
| 365 |
|
| 366 |
TestHelper.checkBadSourceObservable(new Function<Observable<Integer>, Object>() { |
| 367 |
@Override |
| 368 |
public Object apply(final Observable<Integer> o) throws Exception { |
| 369 |
return Observable.just(1).debounce(new Function<Integer, ObservableSource<Integer>>() { |
| 370 |
@Override |
| 371 |
public ObservableSource<Integer> apply(Integer v) throws Exception { |
| 372 |
return o; |
| 373 |
} |
| 374 |
}); |
| 375 |
} |
| 376 |
}, false, 1, 1, 1); |
| 377 |
} |
| 378 |
|
| 379 |
@Test |
| 380 |
public void debounceWithEmpty() { |
| 381 |
Observable.just(1).debounce(Functions.justFunction(Observable.empty())) |
| 382 |
.test() |
| 383 |
.assertResult(1); |
| 384 |
} |
| 385 |
|
| 386 |
@Test |
| 387 |
public void doubleOnSubscribe() { |
| 388 |
TestHelper.checkDoubleOnSubscribeObservable(new Function<Observable<Object>, Observable<Object>>() { |
| 389 |
@Override |
| 390 |
public Observable<Object> apply(Observable<Object> o) throws Exception { |
| 391 |
return o.debounce(Functions.justFunction(Observable.never())); |
| 392 |
} |
| 393 |
}); |
| 394 |
} |
| 395 |
|
| 396 |
@Test |
| 397 |
public void disposeInOnNext() { |
| 398 |
final TestObserver<Integer> to = new TestObserver<>(); |
| 399 |
|
| 400 |
BehaviorSubject.createDefault(1) |
| 401 |
.debounce(new Function<Integer, ObservableSource<Object>>() { |
| 402 |
@Override |
| 403 |
public ObservableSource<Object> apply(Integer o) throws Exception { |
| 404 |
to.dispose(); |
| 405 |
return Observable.never(); |
| 406 |
} |
| 407 |
}) |
| 408 |
.subscribeWith(to) |
| 409 |
.assertEmpty(); |
| 410 |
|
| 411 |
assertTrue(to.isDisposed()); |
| 412 |
} |
| 413 |
|
| 414 |
@Test |
| 415 |
public void disposedInOnComplete() { |
| 416 |
final TestObserver<Integer> to = new TestObserver<>(); |
| 417 |
|
| 418 |
new Observable<Integer>() { |
| 419 |
@Override |
| 420 |
protected void subscribeActual(Observer<? super Integer> observer) { |
| 421 |
observer.onSubscribe(Disposable.empty()); |
| 422 |
to.dispose(); |
| 423 |
observer.onComplete(); |
| 424 |
} |
| 425 |
} |
| 426 |
.debounce(Functions.justFunction(Observable.never())) |
| 427 |
.subscribeWith(to) |
| 428 |
.assertEmpty(); |
| 429 |
} |
| 430 |
|
| 431 |
@Test |
| 432 |
public void emitLate() { |
| 433 |
final AtomicReference<Observer<? super Integer>> ref = new AtomicReference<>(); |
| 434 |
|
| 435 |
TestObserver<Integer> to = Observable.range(1, 2) |
| 436 |
.debounce(new Function<Integer, ObservableSource<Integer>>() { |
| 437 |
@Override |
| 438 |
public ObservableSource<Integer> apply(Integer o) throws Exception { |
| 439 |
if (o != 1) { |
| 440 |
return Observable.never(); |
| 441 |
} |
| 442 |
return new Observable<Integer>() { |
| 443 |
@Override |
| 444 |
protected void subscribeActual(Observer<? super Integer> observer) { |
| 445 |
observer.onSubscribe(Disposable.empty()); |
| 446 |
ref.set(observer); |
| 447 |
} |
| 448 |
}; |
| 449 |
} |
| 450 |
}) |
| 451 |
.test(); |
| 452 |
|
| 453 |
ref.get().onNext(1); |
| 454 |
|
| 455 |
to |
| 456 |
.assertResult(2); |
| 457 |
} |
| 458 |
|
| 459 |
@Test |
| 460 |
public void timedDoubleOnSubscribe() { |
| 461 |
TestHelper.checkDoubleOnSubscribeFlowable(new Function<Flowable<Object>, Publisher<Object>>() { |
| 462 |
@Override |
| 463 |
public Publisher<Object> apply(Flowable<Object> f) |
| 464 |
throws Exception { |
| 465 |
return f.debounce(1, TimeUnit.SECONDS); |
| 466 |
} |
| 467 |
}); |
| 468 |
} |
| 469 |
|
| 470 |
@Test |
| 471 |
public void timedDisposedIgnoredBySource() { |
| 472 |
final TestObserver<Integer> to = new TestObserver<>(); |
| 473 |
|
| 474 |
new Observable<Integer>() { |
| 475 |
@Override |
| 476 |
protected void subscribeActual( |
| 477 |
Observer<? super Integer> observer) { |
| 478 |
observer.onSubscribe(Disposable.empty()); |
| 479 |
to.dispose(); |
| 480 |
observer.onNext(1); |
| 481 |
observer.onComplete(); |
| 482 |
} |
| 483 |
} |
| 484 |
.debounce(1, TimeUnit.SECONDS) |
| 485 |
.subscribe(to); |
| 486 |
} |
| 487 |
|
| 488 |
@Test |
| 489 |
public void timedLateEmit() { |
| 490 |
TestObserver<Integer> to = new TestObserver<>(); |
| 491 |
DebounceTimedObserver<Integer> sub = new DebounceTimedObserver<>( |
| 492 |
to, 1, TimeUnit.SECONDS, new TestScheduler().createWorker()); |
| 493 |
|
| 494 |
sub.onSubscribe(Disposable.empty()); |
| 495 |
|
| 496 |
DebounceEmitter<Integer> de = new DebounceEmitter<>(1, 50, sub); |
| 497 |
de.run(); |
| 498 |
de.run(); |
| 499 |
|
| 500 |
to.assertEmpty(); |
| 501 |
} |
| 502 |
|
| 503 |
@Test |
| 504 |
public void timedError() { |
| 505 |
Observable.error(new TestException()) |
| 506 |
.debounce(1, TimeUnit.SECONDS) |
| 507 |
.test() |
| 508 |
.assertFailure(TestException.class); |
| 509 |
} |
| 510 |
|
| 511 |
@Test |
| 512 |
public void debounceOnEmpty() { |
| 513 |
Observable.empty().debounce(new Function<Object, ObservableSource<Object>>() { |
| 514 |
@Override |
| 515 |
public ObservableSource<Object> apply(Object o) { |
| 516 |
return Observable.just(new Object()); |
| 517 |
} |
| 518 |
}).subscribe(); |
| 519 |
} |
| 520 |
|
| 521 |
@Test |
| 522 |
public void doubleOnSubscribeTime() { |
| 523 |
TestHelper.checkDoubleOnSubscribeObservable(o -> o.debounce(1, TimeUnit.SECONDS)); |
| 524 |
} |
| 525 |
} |