-
Notifications
You must be signed in to change notification settings - Fork 374
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
Sdk to tests #469
Sdk to tests #469
Conversation
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
…naure field in request serialization Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Andrew Nikitin <[email protected]>
helper and test_catchup_during_3pc
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Andrew Nikitin <[email protected]>
Signed-off-by: Andrew Nikitin <[email protected]>
Signed-off-by: Andrew Nikitin <[email protected]>
Signed-off-by: Andrew Nikitin <[email protected]>
Public/indy 901
Signed-off-by: Dmitry Surnin <[email protected]>
…k-to-tests Signed-off-by: Dmitry Surnin <[email protected]>
Signed-off-by: Dmitry Surnin <[email protected]>
plenum/test/helper.py
Outdated
from plenum.test.test_client import TestClient, genTestClient | ||
from plenum.test.test_node import TestNode, TestReplica, TestNodeSet, \ | ||
checkNodesConnected, ensureElectionsDone, NodeRef, getPrimaryReplica | ||
from stp_core.common.log import getlogger | ||
from stp_core.loop.eventually import eventuallyAll, eventually | ||
from stp_core.loop.looper import Looper | ||
from stp_core.network.util import checkPortAvailable | ||
from typing import Sequence |
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.
could you move that into the upper import statement for 'typing'?
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.
done
plenum/test/helper.py
Outdated
from plenum.test.test_client import TestClient, genTestClient | ||
from plenum.test.test_node import TestNode, TestReplica, TestNodeSet, \ | ||
checkNodesConnected, ensureElectionsDone, NodeRef, getPrimaryReplica | ||
from stp_core.common.log import getlogger | ||
from stp_core.loop.eventually import eventuallyAll, eventually | ||
from stp_core.loop.looper import Looper | ||
from stp_core.network.util import checkPortAvailable | ||
from typing import Sequence | ||
from plenum.common.constants import CURRENT_PROTOCOL_VERSION |
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.
the same
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.
done
plenum/test/helper.py
Outdated
from typing import Sequence | ||
from plenum.common.constants import CURRENT_PROTOCOL_VERSION | ||
from plenum.common.request import Request | ||
import json |
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.
could you move that to the beginning of the file where all global imports are defined?
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.
done
plenum/test/helper.py
Outdated
import json | ||
from indy.ledger import sign_and_submit_request, sign_request, submit_request, build_nym_request | ||
from indy.error import ErrorCode, IndyError | ||
import asyncio |
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.
the same
rem = num_reqs % num_batches | ||
if rem == 0: | ||
rem = num_reqs // num_batches | ||
sdk_resps.extend(sdk_send_random_and_check(looper, txnPoolNodeSet, sdk_pool, sdk_wallet, rem, **kwargs)) |
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.
seems in current logic we will send num_batches + 1
. also rem==0
is also is not checked
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.
it is ok
range - 1 generates num_batches -1 sends
the last chunk contains less or equal reqs, so last send will contain full batch or less txns
@@ -70,6 +64,8 @@ def testRequestDynamicValidation(tconf, looper, txnPoolNodeSet, | |||
REJECT is sent to the client | |||
:return: | |||
""" | |||
# Change this test for using SDK. |
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.
please, add TODO mark
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.
done
plenum/test/conftest.py
Outdated
@@ -58,6 +58,12 @@ | |||
from plenum.test.test_node import TestNode, TestNodeSet, Pool, \ | |||
checkNodesConnected, ensureElectionsDone, genNodeReg | |||
from plenum.common.config_helper import PConfigHelper, PNodeConfigHelper | |||
import json |
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.
please, move that to the beginning of the file
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.
done
Signed-off-by: Dmitry Surnin <[email protected]>
No description provided.