Michael Ossareh wrote:
Hi David,
Thanks for your feedback. I noted your example and my reference to
"solution to this" looks not to dissimilar from what you're doing
(except I don't want to change the filter chain for fear of creating a
difference between prod and dev). The same goes for dummy session. As
I get more to grips with MINA I'm sure my assertions as to how to
build the tests will change.
Cheers,
mike
I understand your concerns about not wanting to make a difference
between dev and prod. But I'd offer 2 pieces of feedback:
1) Just adding a listener at the end of your filter chain isn't really
introducing any real change in behavior in your test filter chain.
2) Is it really necessary to have identical conditions between dev and
prod for every single test? I'd argue no. You can have some tests that
test for correct behavior, others that test network I/O, etc.. Given
that, you can set up one set of tests that just do black-box testing
directly against your server's filter chain (as in my example), in order
to verify that specific inputs generate expected outputs. Then,
separately, you can write additional tests against the full server (and
thus the prod filter chain) via a socket to test the server's network
I/O, performance, etc. If you handle the two kinds of tests separately
it makes your testing job simpler.
HTH,
DR