Skip to content
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

test: make monerod stagenet usage resilient #3572

Conversation

hansieodendaal
Copy link
Contributor

Description

Made monerod stagenet usage resilient for use in cucumber by testing publically available URLs from a pre-defined list before assigning the first available and responsive one to use. Flaky URLs have been pushed to the back of the list.

Motivation and Context

Cucumber merge mining tests failed because the currently hard-coded monerod was not available.

How Has This Been Tested?

Tested merge mining in cucumber, All the responsive URLs in the list have been tested to work with the merge mining proxy. Sample console output below:

  >> Warn: `monerod` at http://3.104.4.129:18081 is not available!
  >> Info: `monerod` at http://singapore.node.xmr.pm:38081 is responsive and available

Made monerod stagent usage resilient for use in cucumber.
@@ -38,7 +40,7 @@ class MergeMiningProxyProcess {
// console.log("MergeMiningProxyProcess init - assign server GRPC:", this.grpcPort);
}

run(cmd, args) {
run(cmd, args, monerodUrl) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally I’d rather this key/value is just added to the args object it doesn’t need to be a new function parameter

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, args is for the command line so this is fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the comment, but I would rather not so that args can remain dedicated for the command line arguments.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure I agree with that, but next time additional parameters are required then this should be refactored into an opts object

@delta1
Copy link
Contributor

delta1 commented Nov 15, 2021

Nice idea!

@stringhandler stringhandler changed the title test: make monerod stagent usage resilient test: make monerod stagenet usage resilient Nov 16, 2021
@aviator-app aviator-app bot merged commit 51b6121 into tari-project:development Nov 16, 2021
@hansieodendaal hansieodendaal deleted the ho_monerod_stagenet_cucumber branch November 16, 2021 07:46
sdbondi added a commit to sdbondi/tari that referenced this pull request Nov 18, 2021
* development: (32 commits)
  feat: add atomic swap refund transaction handling (tari-project#3573)
  feat: improve wallet connectivity status for console wallet (tari-project#3577)
  v0.21.1
  feat: add error codes to LibWallet for CipherSeed errors (tari-project#3578)
  ci: split cucumber job into two (tari-project#3583)
  feat(wallet): import utxo’s as EncumberedToBeReceived rather than Unspent (tari-project#3575)
  docs: rfc 0250_Covenants (tari-project#3574)
  feat: get fee for transactions for stratum transcoder (tari-project#3571)
  test: make monerod stagenet usage resilient (tari-project#3572)
  feat: add atomic swap htlc sending and claiming (tari-project#3552)
  feat: implement prometheus metrics for base node (tari-project#3563)
  feat: implement multiple read single write for sqlite (tari-project#3568)
  feat: trigger time lock balance update when block received (tari-project#3567)
  test: reduce cucumber ci to critical only (tari-project#3566)
  test: fix cucumber console wallet startup (tari-project#3564)
  chore: add node id/public key to log mdc (tari-project#3559)
  fix: avoid implicit using of the time crate (tari-project#3562)
  feat: one-click installer - cli edition (tari-project#3534)
  ci: add workflow dispatch to libwallet build action (tari-project#3556)
  fix: stop leak of value of recovered output (tari-project#3558)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants