Galder Zamarreno wrote:
Hi guys,
I've spotted that JdbcMixedCacheStoreTest and others currently use
TestObjectStreamMarshaller rather than VersionAwareMarshaller. Why is
this? Easies of debugging with XStream based marshaller?
To increase test coverage, I'd suggest using VAM rather
TestObjectStreamMarshaller in tests as well.
In the case of JdbcMixedCacheStoreTest, the extended test coverage comes
from the fact that fromStream and toStream use start/multiple
writes/finish marshalling pattern, which is different to RPC calls,
where it's basically, start/one write/finish.
I can see the point of dummy cache stores cos you avoid needing a
database, files...etc, but I'm not sure whether about a dummy/test
marshaller. The more the production marshaller is used, the bigger test
coverage we have.
One thing I've noted when testing JBoss Marshaller is that during
payload size comparisons, old Marshaller was broken for example when
marshalling/unmarshalling:
- 3 out of 4 InternalCacheEntries impls: MortalCacheEntry,
TransientCacheEntry and TransientMortalCacheEntry
- Bucket
- 3 out of 4 InternalCacheValue impls: MortalCacheValue,
TransientCacheValue and TransientMortalCacheValue
These classes seem to be primarily oriented at CacheStore
marshalling/unmarshalling and I believe my email above would explain why
tests passed in spite of old Marshaller being broken.
Regards,
--
Galder ZamarreƱo
Sr. Software Maintenance Engineer
JBoss, a division of Red Hat