[coordinator-test] Remove the need for a real VC#610
Conversation
813708c to
d364ecd
Compare
d364ecd to
c97d8c9
Compare
cendhu
left a comment
There was a problem hiding this comment.
I am fine with this change but add unit-test for this mock vcservice as it has some core logic such as MVCC.
c6a0260 to
4a30189
Compare
|
@liran-funaro Not sure whether you missed my comment. Please add unit-test for this mock vcservice. |
4a30189 to
a3b0294
Compare
5269f0c to
d549bbc
Compare
|
@cendhu Added tests |
cendhu
left a comment
There was a problem hiding this comment.
We need to address two issues with this approach:
- Logic Duplication & Correctness: We are duplicating the core logic of vcservice here, which makes me question if the trade-off is worth it. It already allowed two bugs to slip past our coordinator and mock tests. Since correctness is strictly more important than reducing test runtime, we should evaluate these changes carefully to avoid introducing hard-to-detect bugs.
- Future Maintenance: When we implement snapshots and checkpoints, I'm concerned we will have to add even more complexity to this mock.
As a general rule, mocks should be kept as simple (or 'dumb') as possible. While I supported this change earlier, I am skeptical about it now.
|
@cendhu I understand your concern. The motivation is not performance, but test encapsulation. |
Yes, this sounds interesting and similar to how most mock frameworks work. How can we approach this? |
e44d8b1 to
7ae3bdb
Compare
|
@cendhu I modified the PR according to the discussion in this PR |
Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
7ae3bdb to
a0dfe85
Compare
Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
a0dfe85 to
666249e
Compare
Signed-off-by: Liran Funaro <liran.funaro@gmail.com>
Type of change
Description
Related issues