New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transaction status events tested for each of 7 peers #1631
Transaction status events tested for each of 7 peers #1631
Conversation
Codecov Report
@@ Coverage Diff @@
## iroha2-dev #1631 +/- ##
==============================================
+ Coverage 74.75% 75.86% +1.11%
==============================================
Files 120 119 -1
Lines 19803 19671 -132
==============================================
+ Hits 14803 14923 +120
+ Misses 5000 4748 -252
Continue to review full report at Codecov.
|
1dbd132
to
14dc1e3
Compare
|
||
let committed_event_received = Arc::new(RwLock::new([false; PEER_COUNT])); | ||
let validating_event_received = Arc::new(RwLock::new([false; PEER_COUNT])); | ||
let rejected_event_received = Arc::new(RwLock::new([false; PEER_COUNT])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
funny thing, these array locations are not accessed concurrently, each thread accesses different index. But that would be a pain to express correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, you can have:
const INIT: AtomicBool = AtomicBool::new(false);
let rejected_event_received = Arc::new([INIT; PEER_COUNT]);
if you think that's worth the trouble for this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it doesn't matter here that much as it's just a test.
b49254b
to
fc351c0
Compare
fc351c0
to
fd5214e
Compare
Signed-off-by: Egor Ivkov <e.o.ivkov@gmail.com>
fd5214e
to
8f6f77a
Compare
Signed-off-by: Egor Ivkov e.o.ivkov@gmail.com
Description of the Change
Transaction status events are tested:
Issue
#1492
Benefits
Thoroughly testing potential bug cases described in the issue.