bosagora / agora

POC Node implementation for CoinNet
https://bosagora.io
MIT License
37 stars 22 forks source link

Replace assertion with exception for unit test network #3279

Closed hewison-chris closed 2 years ago

hewison-chris commented 2 years ago

When makeClient or makeRegistryClient fails then throw an exception as the calling code will handle it. This is an attempt to prevent the Trying to access ... without first creating it test failures.

codecov[bot] commented 2 years ago

Codecov Report

Merging #3279 (311ab9c) into v0.x.x (9d28f5c) will increase coverage by 0.11%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           v0.x.x    #3279      +/-   ##
==========================================
+ Coverage   87.83%   87.95%   +0.11%     
==========================================
  Files         164      165       +1     
  Lines       16932    17044     +112     
==========================================
+ Hits        14873    14991     +118     
+ Misses       2059     2053       -6     
Flag Coverage Δ
integration 34.25% <ø> (?)
unittests 87.94% <0.00%> (+0.10%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
source/agora/test/Base.d 80.67% <0.00%> (-0.32%) :arrow_down:
source/scpd/scp/SCPDriver.d 60.00% <0.00%> (-15.00%) :arrow_down:
source/agora/test/ValidatorRecurringEnrollment.d 94.23% <0.00%> (-0.97%) :arrow_down:
source/agora/node/main.d 44.85% <0.00%> (ø)
source/agora/script/Engine.d 97.74% <0.00%> (+0.15%) :arrow_up:
source/agora/network/Manager.d 78.48% <0.00%> (+0.31%) :arrow_up:
source/agora/consensus/state/Ledger.d 90.72% <0.00%> (+0.33%) :arrow_up:
source/agora/consensus/protocol/Nominator.d 91.63% <0.00%> (+0.53%) :arrow_up:
source/agora/node/FullNode.d 74.30% <0.00%> (+0.61%) :arrow_up:
source/agora/node/Validator.d 92.96% <0.00%> (+1.55%) :arrow_up:
... and 5 more

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 9d28f5c...311ab9c. Read the comment docs.