This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TraceurRetryFailureShowcase { | |
@Test | |
fun usingRetryWithTraceurFails() { | |
Traceur.enableLogging() | |
val publishSubject = PublishSubject.create<Int>() | |
val errors = mutableListOf<Throwable>() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(AndroidJUnit4::class) | |
class TraceurStackOverflowTest { | |
@Test | |
fun errorReportedCorrectlyWithoutTraceur() { | |
Traceur.disableLogging() | |
var i = 1 | |
Observable.just(1) | |
.doOnNext { throw Exception("source exception") } | |
.doOnError { throw Exception("in chain exception ${i++}") } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun <T : Any> Observable<List<T>>.replaceInLocalRepo(localRepository: Repository<T>, | |
localSpecification: Specification): Observable<List<T>> = | |
this.flatMapSingle { incomingEntities -> | |
runInTransactionSingle { | |
incomingEntities | |
.asSingle() | |
.flatMap { | |
localRepository | |
.remove(localSpecification) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(AndroidJUnit4::class) | |
class RxJava2DebugStackOverflowTest { | |
@Test | |
fun errorReportedCorrectlyWithoutRxJava2Debug() { | |
RxJava2Debug.disableRxJava2AssemblyTracking() | |
var i = 1 | |
Observable.just(1) | |
.doOnNext { throw Exception("source exception") } | |
.doOnError { throw Exception("in chain exception ${i++}") } |