directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Tence <>
Subject Re: Getting rid of snacc dependency in snickers test cases
Date Wed, 09 Feb 2005 03:55:45 GMT

A lot of the test cases in svn have been migrated to using pre-computed 
PDUs. This goes for encoders as well as decoders tests. Tests have also 
been simplified to rely on the equals() implementation of message 
classes - it'll test it for the same price.

However, some of the test cases are causing trouble. The offending test 
cases have an TODO: tag that will help identify them. For those test, 
the migrated version is in comment until I can find out what's going on.

So far here's what I've learned about tests failing when migrated:

1. All decoder tests that use a response containing a BUSY result code 
fail. The decoded message shows a SUCCESS result code.

2. ModifyRequestTest fails for an unknown reason

3. I'm not sure how to migrate the SearchRequestTest

4. ExtendedResponseEncoderTest is a copy of ExtendedRequestEncoderTest 
instead of a test of its own.

5. Encoders generate PDUs that look equivalent yet are different from 
snacc one's - a CHOICE order maybe?

I'm currently investigated #1. For #5, my plan is to check the RFC 
defining the message ASN1 structures to see if they're indeed equivalent.

- Vincent

Vincent Tence wrote:
> I'm in the process of migrating Snickers test cases to using 
> pre-computed pdus rather than relying on Snacc provider to compute pdus 
> on the fly.
> The pre-computed pdus are generated using a helper class that I want to 
> keep outside the snickers subproject, for breaking the snickers -> snacc 
> dependency. I've not found a definitive home for it, but I was thinking 
> of putting it within the test folder of the snacc component. WDYT?
> You can use this helper class in one of the following ways:
> 1. Serialize a message content to XML using XStream and feed it to the 
> PDUGenerator (not sure this is any useful after all)
> 2. Copy and paste your message building code in the PDUGenerator class
> (KISS)
> In both cases the end result is the PDU string that you can just paste 
> to your snickers test case:
> byte[] req = new byte[] <paste here>
> If we're ok with this, I'll proceed and update all the test cases.
> - Vincent

View raw message