-
Notifications
You must be signed in to change notification settings - Fork 276
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
refactor!: black-box integration tests #5124
Merged
mversic
merged 22 commits into
hyperledger-iroha:main
from
0x009922:black-box-test-network
Oct 18, 2024
Merged
refactor!: black-box integration tests #5124
mversic
merged 22 commits into
hyperledger-iroha:main
from
0x009922:black-box-test-network
Oct 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x009922
added
Refactor
Improvement to overall code quality
Tests
blocked
this problem can't be fixed yet
labels
Oct 4, 2024
0x009922
changed the title
fix(iroha_config): broken trusted peers check
refactor!: black-box integration tests
Oct 4, 2024
4 tasks
0x009922
force-pushed
the
black-box-test-network
branch
from
October 9, 2024 03:51
9418686
to
47ff279
Compare
0x009922
removed
api-changes
Changes in the API for client libraries
blocked
this problem can't be fixed yet
labels
Oct 9, 2024
6 tasks
0x009922
requested review from
s8sato,
mversic,
SamHSmith,
outoftardis,
Erigara,
DCNick3 and
dima74
as code owners
October 9, 2024 04:05
|
0x009922
force-pushed
the
black-box-test-network
branch
from
October 9, 2024 08:18
e938063
to
497ee50
Compare
This was
linked to
issues
Oct 10, 2024
0x009922
commented
Oct 11, 2024
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.
Self-review
0x009922
force-pushed
the
black-box-test-network
branch
from
October 11, 2024 08:08
497ee50
to
d8433e1
Compare
Erigara
reviewed
Oct 14, 2024
Signed-off-by: 0x009922 <[email protected]>
Signed-off-by: 0x009922 <[email protected]>
Signed-off-by: 0x009922 <[email protected]>
Signed-off-by: 0x009922 <[email protected]>
Co-authored-by: Marin Veršić <[email protected]> Signed-off-by: 0x009922 <[email protected]>
Signed-off-by: 0x009922 <[email protected]>
Signed-off-by: 0x009922 <[email protected]>
Signed-off-by: 0x009922 <[email protected]>
Co-authored-by: Marin Veršić <[email protected]> Signed-off-by: 0x009922 <[email protected]>
Signed-off-by: 0x009922 <[email protected]>
0x009922
force-pushed
the
black-box-test-network
branch
from
October 18, 2024 00:39
3f77a1e
to
05da0bd
Compare
nxsaken
previously approved these changes
Oct 18, 2024
mversic
previously approved these changes
Oct 18, 2024
Signed-off-by: Marin Veršić <[email protected]>
mversic
approved these changes
Oct 18, 2024
nxsaken
approved these changes
Oct 18, 2024
s8sato
approved these changes
Oct 18, 2024
This was referenced Oct 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api-changes
Changes in the API for client libraries
Refactor
Improvement to overall code quality
Tests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re-opening of #5087
Build on top of, and should be undrafted after merging of:
TcpListener
#5122wasm_samples
#5123Context
iroha_test_network
has a few problems:thread::sleep
s with pipeline time instead of providing precise lifecycle hooksBlack boxing would mean to run Iroha through its CLI as a dedicated process, just as users would do.
Solution
Re-implement
iroha_test_network
:irohad
as a direct child process. Close Proper black-box integration tests MVP #4500irohad
target (e.g.debug
,release
)fslock
-based solution) - no more manual ports setting. Works intra-process (cargo test
) and inter-process (cargo nextest
Use Nextest #4987).SIGINT
(Ctrl + C). It used to be suspended.Other changes:
unstable_network
tests: they rely on a direct violation of black boxing - the use ofFreezeStatus
to make peers faulty. To be re-implemented in some other way.irohad
a closed binary; don't exposeIroha
; remove samples from it. Close [suggestion] Refactor Iroha CLI #4136iroha_core
.Further steps
iroha_test_network
an executable, use in pytests and in SDKsiroha_core
itself.Flaky tests
restarted_peer_should_have_the_same_asset_amount
- possibly due to a bug in Iroha? Read FIXME comment there.extra_functional::connected_peers::*
sometimes fail due to [BUG] Sumeragi panics with "index out of bounds" message after unregistering a peer #5104Migration Guide
For devs: you need to have
irohad
available in$PATH
before running tests usingiroha_test_network
. The easiest way to achieve this is by running:Review notes
Due to Client still being blocking, there is some ugly code with
spawn_blocking
.Checklist
CONTRIBUTING.md
.