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: fix cucumber console wallet startup #3564

Conversation

hansieodendaal
Copy link
Contributor

@hansieodendaal hansieodendaal commented Nov 12, 2021

Description

  • Fixed an issue with the wallet startup promise not resolving consistently (... a broken fix introduced by me in feat: one-click installer - cli edition #3534).
  • Added explicit startup markers (Tari Console Wallet running...) in the console wallet that will print to stdout for the sake of cucumber tests. These are scraped to indicate the wallet startup state.
  • Improved flaky test Scenario: As a user I want to discover-peer via command line
  • Added variable time out settings for wallet.runCommand(command) for the different As a user I ... via command line steps according to the higher-level logic.

Motivation and Context

Cucumber tests were not running successfully.

How Has This Been Tested?

Cucumber:

  • npm test -- --profile ci --name "via command line"
  • npm test -- --tags "not @long-running and not @broken"

Sample stdout output:

Installing new config file at C:\Users\pluto\Documents\Code\@tari-project\integration_tests\temp\base_nodes\202111121208\Wallet5529-WALLET\config\config.toml
Initializing logging according to "C:\\Users\\pluto\\Documents\\Code\\@tari-project\\integration_tests\\log4rs\\wallet.yml"
Tari Console Wallet running... (gRPC mode started)
Initializing logging according to "C:\\Users\\pluto\\Documents\\Code\\@tari-project\\integration_tests\\log4rs\\wallet.yml"
Tari Console Wallet running... (Command mode started)
==============
Command Runner
==============

1. discover-peer e88343a9b0d734a0ed98e0e3b558493d91220216599b676de12c76a2ce7ef369

Waiting for connectivity... ✅
🌎 Peer discovery started.
⚡️ Discovery succeeded in 77ms.
[05696c85b9a0ab4b] PK=e88343a9b0d734a0ed98e0e3b558493d91220216599b676de12c76a2ce7ef369 (/ip4/127.0.0.1/tcp/5537) - . Type: BASE_NODE. User agent: tari/basenode/0.21.0. Last connected at 2021-11-12 10:08:51.
Tari Console Wallet running... (Command mode completed)
Tari Console Wallet running... (gRPC mode started)
>>>> End of ./temp/base_nodes/202111121208/Wallet5529-WALLET/log/stdout.log
Installing new config file at C:\Users\pluto\Documents\Code\@tari-project\integration_tests\temp\base_nodes\202111121210\Wallet5586-WALLET\config\config.toml
Initializing logging according to "C:\\Users\\pluto\\Documents\\Code\\@tari-project\\integration_tests\\log4rs\\wallet.yml"
Tari Console Wallet running... (gRPC mode started)
Initializing logging according to "C:\\Users\\pluto\\Documents\\Code\\@tari-project\\integration_tests\\log4rs\\wallet.yml"
Tari Console Wallet running... (Command mode started)
==============
Command Runner
==============

1. set-custom-base-node a637ce92c0e07ff9fc39a023a1b6530d1873be782cc27e258995af27bb5d3101 /ip4/127.0.0.1/tcp/5581

Setting base node peer...
a637ce92c0e07ff9fc39a023a1b6530d1873be782cc27e258995af27bb5d3101::/ip4/127.0.0.1/tcp/5581
Custom base node peer saved in wallet database.
Tari Console Wallet running... (Command mode completed)
Tari Console Wallet running... (gRPC mode started)
Initializing logging according to "C:\\Users\\pluto\\Documents\\Code\\@tari-project\\integration_tests\\log4rs\\wallet.yml"
Tari Console Wallet running... (Command mode started)
==============
Command Runner
==============

1. clear-custom-base-node 

Custom base node peer cleared from wallet database.
Tari Console Wallet running... (Command mode completed)
Tari Console Wallet running... (gRPC mode started)
>>>> End of ./temp/base_nodes/202111121210/Wallet5586-WALLET/log/stdout.log

Added explicit startup markers in the console wallet that will print
to stdout for the sake of cucumber tests. These are scraped to indicate
the wallet startup state.
@hansieodendaal hansieodendaal force-pushed the ho_fix_cucumber_console_wallet_startup branch from cf163b4 to 9c9ea28 Compare November 12, 2021 11:27
@aviator-app aviator-app bot merged commit e177d37 into tari-project:development Nov 12, 2021
@hansieodendaal hansieodendaal deleted the ho_fix_cucumber_console_wallet_startup branch November 12, 2021 12:42
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.

None yet

2 participants