On Tue, Jun 9, 2009 at 8:08 AM, David Rosenstrauch<[email protected]> wrote: > 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.
Thanks for your continuing thoughts, David. Do you have any suggestions on how to verify that encoding and decoding work? I'm taking a POJO sending it - it gets encoded into a series of bytes. The decoding (logically required for verifying that things encoded correctly) is triggered by the framework so not entirely sure how to harness them. FWIW I'm using the demuxing stuff for all the various packet types that I have. > > HTH, > > DR > -- god loves atheists, Fact: http://www.mrwiggleslovesyou.com/comics/rehab477.jpg
