Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Unify mongodb test stat477 #1158

Merged
merged 7 commits into from
Jan 22, 2018
Merged

Conversation

cijujohn
Copy link
Contributor

@cijujohn cijujohn commented Jan 20, 2018

Integrate eosiod_run_mongodb_test.sh into eosiod_run_test.py. Currently test method getTransByBlockId() has been disabled as it needs to handle multiple transactions. That is an extra validation step and will be done in a followup PR. Create a single test script for both master and Noon branch for maintenance ease.

@@ -67,7 +67,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/restart-scenarios-test.py ${CMAKE_CUR
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testUtils.py ${CMAKE_CURRENT_BINARY_DIR}/testUtils.py COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosiod_run_test.py ${CMAKE_CURRENT_BINARY_DIR}/eosiod_run_test.py COPYONLY)

add_test(NAME eosiod_run_test COMMAND tests/eosiod_run_test.py --exitEarly --dumpErrorDetail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_test(NAME eosiod_run_test COMMAND tests/eosiod_run_test.py --noon --exit-early --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_test(NAME eosiod_run_test COMMAND tests/eosiod_run_test.py --noon --mongodb --exit-early --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ctest does not like 2 tests with the same name.

@@ -105,8 +113,6 @@ def cmdError(name, code=0, exitNow=False):
exchangeAccount.ownerPrivateKey=PRV_KEY2
exchangeAccount.ownerPublicKey=PUB_KEY2

time.sleep(5)

Print("Stand up walletd")
if walletMgr.launch() is False:
cmdError("eos-walletd")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eosio-walletd

if amINoon:
transaction=node.getActionFromDb(transId)
else:
transaction=node.getMessageFromDb(transId)
if transaction is None:
cmdError("eosc get transaction trans_id")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eosioc

if typeVal!= "transfer" or amountVal != 975311:
#if transaction.tType != "transfer" or transaction.amount != 975311:
errorExit("FAILURE - get transaction trans_id failed: %s" % (transId), raw=True)

Print("Get transactions for account %s" % (testeraAccount.name))
actualTransactions=node.getTransactionsArrByAccount(testeraAccount.name)
if actualTransactions is None:
cmdError("eosc get transactions testera")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please search and change all eosc to eosioc, eosd to eosiod. And eos-walletd to eosio-walletd or eosiowd which will be the new name I believe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid comment on executable name change. Made the change.

EosClientPath="programs/eosc/eosc"
EosWalletPath="programs/eos-walletd/eos-walletd"
EosServerName="eosd"
EosServerPath="programs/eosd/%s" % (EosServerName)
EosLauncherPath="programs/launcher/launcher"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this diff went the wrong way. The removed lines are correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script is identical for master and noon branch. This section defines the master specific names. Method iAmNoon() sets the Noon specific names. I did this cause it was becoming a pain-point to sync the script between the two branches. Once noon becomes master we will get rid of this bridge code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realized that after the fact. Sounds like a good plan.

@heifner
Copy link
Contributor

heifner commented Jan 22, 2018

6/8 Test #6: distributed-transactions-test ..........***Failed 0.51 sec
terminate called after throwing an instance of 'fc::eof_exception'
unrecognised option '--eosd'

… updated. Fixed a bug in --dump-error-details handling.
@heifner heifner merged commit f838078 into EOSIO:eos-noon Jan 22, 2018
@cijujohn cijujohn deleted the unifyMongoDbtest-stat477 branch February 1, 2018 14:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants