akka/akka-core

Javadsl TestKit/TestProbe

开放

#25,458 创建于 2018年8月10日

 (1 条评论) (1 个反应) (0 位负责人)Scala (3,547 个派生)batch import
1 - triageddiscusshelp wantedt:testing

仓库指标

星标
 (13,277 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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.

贡献者指南