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

igormcoelho
Copy link
Contributor

Basic unit tests for Mailboxes.

@igormcoelho
Copy link
Contributor Author

@vncoelho please apply your fix.

@vncoelho
Copy link
Member

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

@vncoelho
Copy link
Member

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

vncoelho
vncoelho previously approved these changes Jun 10, 2019
@igormcoelho igormcoelho requested review from erikzhang and shargon June 10, 2019 23:57
shargon
shargon previously approved these changes Jun 11, 2019
@vncoelho vncoelho dismissed stale reviews from shargon and themself via 9f20cf1 June 11, 2019 20:30
@igormcoelho
Copy link
Contributor Author

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

@codecov-io
Copy link

codecov-io 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
Copy link
Member

shargon 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);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

Changed title now :P

@igormcoelho
Copy link
Contributor Author

later I can try to.finish all.

@igormcoelho
Copy link
Contributor Author

Dont accept yet

Copy link
Member

@vncoelho vncoelho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can finish in another PR, Igor.

@igormcoelho igormcoelho merged commit 1a2ac5a into neo-project:master Jun 12, 2019
@igormcoelho igormcoelho deleted the tests_mailbox_3x branch June 12, 2019 17:58
@igormcoelho
Copy link
Contributor Author

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

Thacryba pushed a commit to simplitech/neo that referenced this pull request Feb 17, 2020
* 部署和调用智能合约 wrong link

cant goto 部署和调用智能合约 page cause of missing "zh-cn"

* add sc migrate

* format code

* update
Thacryba pushed a commit to simplitech/neo that referenced this pull request Feb 17, 2020
* [EN] Sync up with neo-project#809

[EN] Sync up with neo-project#809

* minor update

* fix some
Tommo-L pushed a commit to Tommo-L/neo that referenced this pull request Jun 22, 2020
* tests for mailboxes on 3x

* Fixing UT to MessageCommand

* Fixing string

* Explicit Byte

* MessageCommand with random byte

* space

* testing all cases

* Update UT_ConsensusServiceMailbox.cs

* Update UT_RemoteNodeMailbox.cs

* Update UT_TaskManagerMailbox.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants