akka/akka-core

Missing Java API for muting events

Aperta

#26.434 aperta il 22 feb 2019

 (0 commenti) (0 reazioni) (0 assegnatari)Scala (3547 fork)batch import
1 - triagedhelp wantedt:javat:testing

Metriche repository

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

Descrizione

Using the Scala API from Java, one can do:

EventFilter defaultDebug = EventFilter.debug(null, null, "", null, Integer.MAX_VALUE);
system.eventStream().publish(new TestEvent.Mute(Arrays.asList(defaultDebug)));

But with the Java testkit EventFilter there is no way to do that since creating a Scala API EventFilter is hidden inside of it.

There should be a way to do the same from Java using akka.testkit.javadsl.EventFilter

Guida contributor