eclipse-vertx / vertx-junit5

Testing Vert.x applications with JUnit 5
Apache License 2.0
42 stars 30 forks source link

Add convenient base test classes to help users write async tests easier #42

Closed matthewadams closed 10 months ago

matthewadams commented 6 years ago

Just throwing this out there for you to consider. It would've helped me save time. Hoping it might save others time.

jponge commented 6 years ago

Thanks for the proposal.

What does it add compared to just using the VertxExtension directly?

matthewadams commented 6 years ago

@jponge See the difference between

https://github.com/SciSpike/vertx-junit5/blob/abstract-rxjava-vertx-test-classes/src/test/java/io/vertx/junit5/AbstractRxJavaExampleTest.java#L18

and

https://github.com/SciSpike/vertx-junit5/blob/abstract-rxjava-vertx-test-classes/src/test/java/io/vertx/junit5/AbstractRxJavaExampleTest.java#L35.

Notice:

vietj commented 6 years ago

I believe that with the project reorg for Rx and Rx2, we should move all Rx related code to the vertx-rx-java and vertx-rx-java2 which contain already integration tests for rx and Vert.x supported components.

e.g @tsegismont will add an help for vertx-sql in these project for helping the management of transaction with RxJava and RxJava2.

That would be:

https://github.com/vert-x3/vertx-rx/tree/master/rx-java2/src/main/java/io/vertx/reactivex/junit5

instead of this project.

vietj commented 6 years ago

@jponge I'm saying that in case you eventually accept this PR of course

jponge commented 6 years ago

My concern with this PR is that it redoes everything the extension does, and that is the preferred way of operating with VertxTestContext.

Le lun. 28 mai 2018 à 19:05, Julien Viet notifications@github.com a écrit :

@jponge https://github.com/jponge I'm saying that in case you eventually accept this PR of course

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-junit5/pull/42#issuecomment-392571437, or mute the thread https://github.com/notifications/unsubscribe-auth/AABladCNiB5ffy-Q9E_uwwyYVLzwSBkiks5t3C4_gaJpZM4UPAwr .

matthewadams commented 6 years ago

@jponge Please give a link that demonstrates the “preferred way of operating”.

jponge commented 6 years ago

Ah you are right, you provide utilities to deal with rx types.

jponge commented 6 years ago

@matthewadams Did you play with the testing helpers in RxJava? http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/subscribers/TestSubscriber.html / http://reactivex.io/RxJava/2.x/javadoc/io/reactivex/observers/TestObserver.html / etc