asterixdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann" <ti...@apache.org>
Subject IFramewriter state transitions
Date Wed, 09 Dec 2015 01:43:45 GMT
Hi,

When improving test coverage we noticed, that there are some 
inconsistencies wrt. state management and transitions in different 
implementations of IFramewriter. These inconsistencies cause a number of 
test failures - especially when testing error conditions. Ian has 
written up a document [1] on the current contract (which is 
unfortunately not consistently implemented) and on an alternate contract 
that we have discussed.
We currently believe that the alternate contract would be preferable as 
there is more similarity in the approach to handling errors during 
open() or nextFrame().
Our proposal is to
1) Adopt the alternate contract and document it in
    a) the IFramewriter javadoc and
    b) a design document.
2) Implement new operators according to the alternate contract.
3) Add mock-based unit tests (e.g. using Mockito [2]) for new operators 
that verify that the contract is maintained.
4) Add mock-based using test for existing operators as bugs are found 
and fixed.

Please take a look at the document and tell us, what you think about the 
contract and the approach.

Thanks,
Abdullah, Ian, Yingyi, and Till

[1] 
https://docs.google.com/document/d/1QJ8X7QFMMax5D5k9RVje6hoNr_SNZSW9Oshzv7DpcQw/edit?usp=sharing
[2] http://mockito.org/

Mime
View raw message