Skip to content
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

Tests for ProtocolHandler Mailboxes (Neo 3.x) #809

Merged
merged 15 commits into from Jun 12, 2019

Conversation

4 participants
@igormcoelho
Copy link
Contributor

commented Jun 10, 2019

Basic unit tests for Mailboxes.

@igormcoelho

This comment has been minimized.

Copy link
Contributor Author

commented Jun 10, 2019

@vncoelho please apply your fix.

@vncoelho

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

Brother, the fix was already applied.
Travis is strange...

@vncoelho

This comment has been minimized.

Copy link
Member

commented Jun 10, 2019

These tests are not easy to be made! Nice templates, @igormcoelho. Great job.

@igormcoelho igormcoelho requested review from erikzhang and shargon Jun 10, 2019

vncoelho added some commits Jun 11, 2019

@vncoelho vncoelho dismissed stale reviews from shargon and themself via 9f20cf1 Jun 11, 2019

vncoelho and others added some commits Jun 11, 2019

@igormcoelho

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

I guess this is beautiful now. Can you guys approve it? @shargon @vncoelho

@codecov-io

This comment has been minimized.

Copy link

commented Jun 12, 2019

Codecov Report

Merging #809 into master will increase coverage by 0.12%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #809      +/-   ##
==========================================
+ Coverage   37.73%   37.85%   +0.12%     
==========================================
  Files         176      176              
  Lines       12445    12445              
==========================================
+ Hits         4696     4711      +15     
+ Misses       7749     7734      -15
Impacted Files Coverage Δ
neo/Network/P2P/TaskManager.cs 16.75% <ø> (ø) ⬆️
neo/Ledger/Blockchain.cs 36.81% <ø> (ø) ⬆️
neo/Consensus/ConsensusService.cs 14.09% <ø> (ø) ⬆️
neo/Network/P2P/ProtocolHandler.cs 6.97% <ø> (+6.97%) ⬆️
neo/Network/P2P/RemoteNode.cs 0% <ø> (ø) ⬆️
neo/IO/Actors/PriorityMailbox.cs 87.5% <50%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 524ab15...650f416. Read the comment docs.

shargon added some commits Jun 12, 2019

@shargon

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

Where is the tests :P ? I only see for ProtocolHandlerMailbox.cs

uut.IsHighPriority(Message.Create(MessageCommand.Transaction, s)).Should().Be(false);
uut.IsHighPriority(Message.Create(MessageCommand.Block, s)).Should().Be(false);
uut.IsHighPriority(Message.Create(MessageCommand.Consensus, s)).Should().Be(true);
uut.IsHighPriority(Message.Create(MessageCommand.Reject, s)).Should().Be(false);

This comment has been minimized.

Copy link
@igormcoelho

igormcoelho Jun 12, 2019

Author Contributor

Here the tests @shargon! hahaha

Focused on ProtocolHandler this time... Coverage increased a lot already, and on future we cover others ;)

@igormcoelho igormcoelho changed the title Tests for Mailboxes (Neo 3.x) Tests for ProtocolHandler Mailboxes (Neo 3.x) Jun 12, 2019

@igormcoelho

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Changed title now :P

@igormcoelho

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

later I can try to.finish all.

@igormcoelho

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Dont accept yet

@vncoelho
Copy link
Member

left a comment

You can finish in another PR, Igor.

@igormcoelho igormcoelho merged commit 1a2ac5a into neo-project:master Jun 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@igormcoelho igormcoelho deleted the igormcoelho:tests_mailbox_3x branch Jun 12, 2019

@igormcoelho

This comment has been minimized.

Copy link
Contributor Author

commented Jun 12, 2019

Ok then, I have to do for 2x as well.. it will help Ricardo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.