Skip to content

Commit

Permalink
Improving ConsensusService UT: Adding some coverage to OnPersistCompl…
Browse files Browse the repository at this point in the history
…eted, OnPrepReq, OnPrepResponse, OnCommit and some auxiliary methods (#1169)

* Adding random hashes for OnGetDataMessageReceived

* Adding static readonly Random

* Adding Recovery and OnTimer coverage on CN UT

* Fixing files that should not be modified

* Fixing files that should not be modified II

* Greatly improving UT!

* Dotnet format

* Changing to 200ms

* More messages and casting asserts

* Forcing prepReq to 0 hashes because mempool is shared

* UT reaching Commit!

* Trying to check Commit for achieving a blockRelay. However, signatures need to match

* Trying to mock ECPoints. However, errors when GetWitness of Block after adding signatures

* Relaying block! Passing with sucess

* A little bit more coverage and ensure Block Relay event from LocalNode

* Cleaning thread

* Fixing duplicated index of preparation replication and other minor fix

* Returning prevHeader and block to original

* Retuning merkle root of block to original value

* dotnet format!

* Forcing an old timestamp for avoiding OnTimer

* Assert RecoveryMessage because of commitsent

* Improving variable and function names

* Cleaning and improving comments

* Updating blocktime

* Fixing nextconsensus expected hash due to some recent PR

* Capeslock on methods

* Trying to fix UT Consensus

* Increasing coverage for OnPersistCompleted

* Many workarounds but it is working again!

* dotnet format

* Cleaning UTs I

* Cleaninng UTs II

* Minor typo on variable

* Improving comments

* Adding some summary to methods

* Adding clone to the comment

* Adding variable to timestamp

* Removing other timestamps
  • Loading branch information
vncoelho authored Nov 29, 2019
1 parent 5fc5b33 commit 8371a7d
Show file tree
Hide file tree
Showing 3 changed files with 261 additions and 47 deletions.
Loading

0 comments on commit 8371a7d

Please sign in to comment.