Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventFilter does not work as expected #399

Closed
Aaronontheweb opened this issue Sep 16, 2014 · 4 comments
Closed

EventFilter does not work as expected #399

Aaronontheweb opened this issue Sep 16, 2014 · 4 comments

Comments

@Aaronontheweb
Copy link
Member

I ran into some trouble with the EventFilter - we are trying to use it in our implementation of BarrierSpec in the multi-node TestKit: https://github.com/akka/akka/blob/master/akka-remote-tests/src/test/scala/akka/remote/testconductor/BarrierSpec.scala#L43

  1. The old EventFilter methods on AkkaSpec hide the EventFilter property on TestKit, so it's not easily accessible at the moment.
  2. Do any of the new EventFilter overloads support something as simple as what BarrierSpec is trying to accomplish here? https://github.com/akka/akka/blob/master/akka-remote-tests/src/test/scala/akka/remote/testconductor/BarrierSpec.scala#L43 - seems like the new methods want a lot more filtering on the objects themselves. The old EventFilter methods don't work either because they're re-using the TestActor for all of the filter messages and the internal ExpectMsg<Error> call will fail if the TestActor receives a message before the event is logged to the filter.
@HCanber
Copy link
Contributor

HCanber commented Sep 16, 2014

1 Yep, we need to fix #377
2 This code in scala

  EventFilter[BarrierEmpty](occurrences = 1) intercept {
         ...
      }

is in c#

EventFilter.Exception<BarrierEmpty>().ExpectOne(() =>
{
  ...
});

@Aaronontheweb
Copy link
Member Author

Cool, just tried this inside the Remote TestKit!

@HCanber
Copy link
Contributor

HCanber commented Sep 25, 2014

Ok to close?

@Aaronontheweb
Copy link
Member Author

yep, working fine IMHO

@HCanber HCanber closed this as completed Sep 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants