akka/akka-core

Javadsl TestKit/TestProbe

Aperta

#25.458 aperta il 10 ago 2018

 (1 commento) (1 reazione) (0 assegnatari)Scala (3547 fork)batch import
1 - triageddiscusshelp wantedt:testing

Metriche repository

Star
 (13.277 stelle)
Metriche merge PR
 (Merge medio 8g 19h) (10 PR mergiate in 30 g)

Descrizione

In the scaladsl, TestProbe extends TestKit with probing features.

In the javadsl, TestKit itself can be used for probing.

For TestProbe you can optionally supply the name for the probing actor. This feature is not exposed for the javadsl TestKit. While only useful for debugging/logging this might still be nice to add.

Going a step further, we could even consider introducing a the TestProbe/TestKit distinction to the javadsl as well: it seems this could be as simple as introducing a class TestProbe extends TestKit containing the probing methods, and deprecating them on the parent TestKit.

Whichever we choose, we should update the text and code of testing.md in the reference documentation to reflect this: right now the Java version mentions TestProbe which arguably works but doesn't seem right anymore since scaladsl and javadsl have diverged now.

Guida contributor