You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we don't have any dedicated tests for the test framework itself - we only test what we use. One thing that seems important is messages serialization/deserialization.
I propose to write a test that will look like following:
node0 node1
\ /
mininode0 ------ mininode1
So all network traffic goes through mininodes. And we ensure that it is not altered during serialization/deserialization
The text was updated successfully, but these errors were encountered:
Technically we should have p2p_*.py test for every p2p message we have. But I see our p2p tests check too much. Should we have p2p_<message>_schema.py separately or you plan to list all p2p messages in one test and send them through the proposed setup?
Also, If I understood correctly, you expect that node0 or node1 sends messages, right? For some p2p messages, a particular setup is required. Do you plan to "bypass" this setup or create such an environment for node0/node1 that it will start producing such messages?
Should we have p2p__schema.py separately or you plan to list all p2p messages in one test and send them through the proposed setup?
Initial idea was to list them in one test. However it might get too big and perhaps we will have to split by feature or something else. I would say that this will be better to decide once we start working on this test(s).
There is another option though: we can create a MininodeRelay class that will just connect two nodes. And replace direct nodes connection with this relay in several existing tests which allow this.
Also, If I understood correctly, you expect that node0 or node1 sends messages, right?
Right.
create such an environment for node0/node1 that it will start producing such messages
This is what I would like to test - real messages. Not carefully hand-constructed ones
There is another option though: we can create a MininodeRelay class that will just connect two nodes. And replace direct nodes connection with this relay in several existing tests which allow this.
@cmihai yeah, the thing you pointed was actually created by me. But It unfortunately skips serialization/deserialization completely - it relays the whole received buffer.
Currently we don't have any dedicated tests for the test framework itself - we only test what we use. One thing that seems important is messages serialization/deserialization.
I propose to write a test that will look like following:
So all network traffic goes through mininodes. And we ensure that it is not altered during serialization/deserialization
The text was updated successfully, but these errors were encountered: