-
Notifications
You must be signed in to change notification settings - Fork 370
Regression: Add ZMQ tests #1730
base: dev
Are you sure you want to change the base?
Conversation
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.
Maybe also check the values of the zmq responses?
Also you are missing Address
There are 2 nits that you may do if you feel like
|keys | | ||
|sn | | ||
|sn_trytes | | ||
|tx | | ||
|tx_trytes | |
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.
Perhaps you can easily check for values here?
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.
Not particularly, these transactions are just created and sent out so the transaction hashes and trytes are not hardcoded anywhere. I'd have to move the test to a different machine that uses a hardcoded transaction, which can be problematic because the sn and sn_trytes require the transaction to be solidified, which requires a milestone to be issued. So either I write a new scenario just for this part, or I rewrite one of the other tests to accommodate that.
while scan_sockets: | ||
if len(poller.poll(timeout=1000)) != 0: |
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.
nit:
You can make this simplet by doing while len(poller.poll(timeout=1000)) != 0:
I believe.
Then you have less variables and ifs
contains_response = False | ||
for arg in keys: | ||
if received[0].decode() == arg: | ||
contains_response = True |
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.
nit:
Maybe add a break?
You can claim that this is short anyhows and better have less lines of code 🤷♂️
So only do this change if you feel it is correct.
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.
Are you also testing the address
topic?
I missed it...
Anyhows, I am good with your changes, suppose we are waiting for the container side fix?
|
||
Then "storeTransactions" is called on "nodeA-m2" with: | ||
|keys |values |type | | ||
|trytes |TRANSACTION_TEST_TRANSACTION_TRYTES |staticList | |
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.
Why did you make new trytes/static vals here? Couldnt we just reuse TEST_TRYTES/EMPTY_TRYTES?
Description
Add to the current tests to account for zmq topic publishing. It is intended to catch any breaking changes to zmq publishing of transaction and milestone data.
Fixes #1598
Type of change
How Has This Been Tested?
Checklist: