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

add a fetcher test #62

Merged
merged 1 commit into from
May 23, 2024
Merged

add a fetcher test #62

merged 1 commit into from
May 23, 2024

Conversation

konnov
Copy link
Contributor

@konnov konnov commented May 17, 2024

As promised, here is an e2e test for the fetcher

@konnov konnov added the devops All kinds of devops-y activities label May 17, 2024
@konnov konnov added this to the M1: Transaction extractor milestone May 17, 2024
@konnov konnov self-assigned this May 17, 2024
@Kukovec
Copy link
Collaborator

Kukovec commented May 23, 2024

npm run e2e fails for me with:

  1) fetch
       fetches transactions:

      AssertionError [ERR_ASSERTION]: Non-empty queue on spawn exit.
[wait] Target contract: CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND
[wait] Fetching the ledger for 1638368
[wait] + save: 1638383
      + expected - actual

      -[
      -  "[wait] Target contract: CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND"
      -  "[wait] Fetching the ledger for 1638368"
      -  "[wait] + save: 1638383"
      -]
      +[]

@konnov
Copy link
Contributor Author

konnov commented May 23, 2024

npm run e2e fails for me with:

  1) fetch
       fetches transactions:

      AssertionError [ERR_ASSERTION]: Non-empty queue on spawn exit.
[wait] Target contract: CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND
[wait] Fetching the ledger for 1638368
[wait] + save: 1638383
      + expected - actual

      -[
      -  "[wait] Target contract: CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND"
      -  "[wait] Fetching the ledger for 1638368"
      -  "[wait] + save: 1638383"
      -]
      +[]

Can you run manually what the test is doing and see what happens?

solarkraft fetch --rpc https://horizon-testnet.stellar.org --id CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND --height 1638368 --timeout 10

@Kukovec
Copy link
Collaborator

Kukovec commented May 23, 2024

Can you run manually what the test is doing and see what happens?

solarkraft fetch --rpc https://horizon-testnet.stellar.org --id CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND --height 1638368 --timeout 10
$ solarkraft fetch --rpc https://horizon-testnet.stellar.org --id CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND --height 1638368 --timeout 10
Target contract: CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND...
Last cached height: 1
Fetching fresh transactions from: https://horizon-testnet.stellar.org...
Fetching the ledger for 1638368
Fetching transactions for 10 seconds.
+ save: 1638369
+ save: 1638370
+ save: 1638371
+ save: 1638374
+ save: 1638372
+ save: 1638373
+ save: 1638375
+ save: 1638378
+ save: 1638376
+ save: 1638377
+ save: 1638379
+ save: 1638380
+ save: 1638381
+ save: 1638382
+ save: 1638383
= at: 1638412
undefined

@konnov
Copy link
Contributor Author

konnov commented May 23, 2024

Can you run manually what the test is doing and see what happens?

solarkraft fetch --rpc https://horizon-testnet.stellar.org --id CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND --height 1638368 --timeout 10
$ solarkraft fetch --rpc https://horizon-testnet.stellar.org --id CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND --height 1638368 --timeout 10
Target contract: CC22QGTOUMERDNIYN7TPNX3V6EMPHQXVSRR3XY56EADF7YTFISD2ROND...
Last cached height: 1
Fetching fresh transactions from: https://horizon-testnet.stellar.org...
Fetching the ledger for 1638368
Fetching transactions for 10 seconds.
+ save: 1638369
+ save: 1638370
+ save: 1638371
+ save: 1638374
+ save: 1638372
+ save: 1638373
+ save: 1638375
+ save: 1638378
+ save: 1638376
+ save: 1638377
+ save: 1638379
+ save: 1638380
+ save: 1638381
+ save: 1638382
+ save: 1638383
= at: 1638412
undefined

So it did work as expected. Are you sure you ran the test with an up-to-date version of npm run compile?

@Kukovec
Copy link
Collaborator

Kukovec commented May 23, 2024

So it did work as expected. Are you sure you ran the test with an up-to-date version of npm run compile?

I tried it 5s ago, install -> run compile -> run e2e:

  fetch
    ✔ fetches transactions (10919ms)

  verify
    ✔ errors on missing file (128ms)
    ✔ errors on no monitors given (103ms)
    1) reports success on okay monitor1
    2) reports success on okay monitor2
    3) reports success on two okay monitors
    4) reports failure on deadlocking monitor
    5) reports failure on deadlocking monitor, if another succeeding monitor is present


  3 passing (12s)
  5 failing

@Kukovec
Copy link
Collaborator

Kukovec commented May 23, 2024

Must've been some artifact form swapping between the branches. The failing tests are not from the fetcher so they're not blocking here.

@thpani
Copy link
Collaborator

thpani commented May 23, 2024

So it did work as expected. Are you sure you ran the test with an up-to-date version of npm run compile?

I tried it 5s ago, install -> run compile -> run e2e:

  fetch
    ✔ fetches transactions (10919ms)

  verify
    ✔ errors on missing file (128ms)
    ✔ errors on no monitors given (103ms)
    1) reports success on okay monitor1
    2) reports success on okay monitor2
    3) reports success on two okay monitors
    4) reports failure on deadlocking monitor
    5) reports failure on deadlocking monitor, if another succeeding monitor is present


  3 passing (12s)
  5 failing

Like really, it just looks as if it can't run Apalache for some reason.

@konnov konnov merged commit cacd123 into main May 23, 2024
3 checks passed
@konnov konnov deleted the igor/fetcher-test branch May 23, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops All kinds of devops-y activities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants