test: second batch of integration tests#113
test: second batch of integration tests#113prawilny merged 1 commit intoac/integration-tests-2.x/1from
Conversation
|
Those tests are mostly copied from 1.x tests, can't we somehow generalize 1.x tests and use the generalized version here? It won't be straightforward because we cannot make them generic and pass either Async or non-Async connection, because they do not have a common base class. However we can create one - lets say we create a TestConnectionCompat interface. It has all the method that are used in tests (get, put, getScanner, etc.), we make two implementations, one in 1.x which has a MirroringConnection as a member and forwards calls to this member, and 2.x has a MirroringAsyncConnection which implements get() as get(...).get(), etc. The implementation would be specified using a property and ConnectionRule could return this wrapper. This way you'd be able to reuse all the code, and explicitly test only those cases where the behavior is 2.x specific. It seems that Blocking and ErrorDetection can be reused in this way, WDYT? (We have to decide is this is a 2h rewrite or full day operation before implementing this change). I can also see that you are sometimes waiting for the futures to complete and sometimes you are not, is it intended? |
|
As discussed F2F I ignored the comment above. Fixed checkAndMutate tests. Found a bug in reference counting (ListenableReferenceCounter's counter reaches negative numbers) in MirroringAsyncTable (in wrapWithReferenceCounter most probably). |
|
Can you merge this PR with first batch and rename it to "test: 2.x integration tests"? |
cbafc05 to
3e19c19
Compare
921e862 to
d6b9ffe
Compare
Status of 1.x integration tests:
This change is