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

fix: wait for confirmed status before fetch tx in test #821

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

aalu1418
Copy link
Collaborator

@aalu1418 aalu1418 commented Aug 14, 2024

Description

Quick fix to running tests locally - some times the local test validator does not confirm transactions quickly enough. These changes explicitly state waiting for confirmed status before fetching the transaction.

Now:

  24 passing (40s)

✨  Done in 46.48s.

Previous:

  18 passing (23s)
  6 failing

  1) ocr2
       Can call query:
     TypeError: workspace.Store.methods.query(...).accounts(...).options is not a function
      at query (tests/ocr2.spec.ts:118:8)
      at Context.<anonymous> (tests/ocr2.spec.ts:887:23)
      at processImmediate (node:internal/timers:476:21)

  2) ocr2
       Transmit a bunch of rounds to check ringbuffer wraparound:
     TypeError: Cannot read properties of null (reading 'meta')
      at Context.<anonymous> (tests/ocr2.spec.ts:921:21)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  3) ocr2
       Node payouts happen with the correct decimals:

      AssertionError: expected 15 to equal 2
      + expected - actual

      -15
      +2

      at /Users/chainlink/Documents/chainlink-solana/contracts/tests/ocr2.spec.ts:944:16
      at Array.map (<anonymous>)
      at Context.<anonymous> (tests/ocr2.spec.ts:938:33)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  4) ocr2
       Transmit reimburses for setComputeUnitPrice:
     TypeError: Cannot read properties of null (reading 'meta')
      at Context.<anonymous> (tests/ocr2.spec.ts:1029:19)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  5) ocr2
       Reclaims rent exempt deposit when closing down an aggregator:
     TypeError: Cannot read properties of null (reading 'meta')
      at Context.<anonymous> (tests/ocr2.spec.ts:1175:19)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

  6) ocr2
       Can create a feed with no historical ringbuffer:
     TypeError: Cannot read properties of null (reading 'meta')
      at Context.<anonymous> (tests/ocr2.spec.ts:1300:19)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)

@aalu1418 aalu1418 requested a review from a team as a code owner August 14, 2024 14:57
@aalu1418 aalu1418 changed the title fix: wait for confirmed status before fetch tx fix: wait for confirmed status before fetch tx in test Aug 14, 2024
@cl-sonarqube-production
Copy link

Copy link
Contributor

@jadepark-dev jadepark-dev left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@aalu1418 aalu1418 merged commit 28c1136 into develop Aug 14, 2024
31 checks passed
@aalu1418 aalu1418 deleted the fix/ocr2-contract-tests branch August 14, 2024 15:22
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