Skip to content

feat[integration-tests]: add basic stress tests#971

Merged
smartcontracts merged 2 commits intodevelopfrom
kelvin/load-tests-1
Jul 8, 2021
Merged

feat[integration-tests]: add basic stress tests#971
smartcontracts merged 2 commits intodevelopfrom
kelvin/load-tests-1

Conversation

@smartcontracts
Copy link
Copy Markdown
Contributor

@smartcontracts smartcontracts commented May 27, 2021

Description
Adds a series of new load tests. So far I've got:

  • Perform X L1 => L2 transactions
  • Perform X L2 => L1 transactions
  • Perform X L2 transactions

I'll likely break this out into a series of helper functions so we can compose these different actions into more interesting test cases.

Metadata

  • Fixes OP-772

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 27, 2021

🦋 Changeset detected

Latest commit: f1dc8b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/integration-tests Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

const value = ethers.utils.keccak256(
ethers.BigNumber.from(i).toHexString()
)
const transaction = await env.l1Messenger.sendMessage(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps we want to Promise.all these messages?

@tynes
Copy link
Copy Markdown
Contributor

tynes commented May 27, 2021

Can you add a changeset because the integration tests are published in a docker image?

Copy link
Copy Markdown
Contributor

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

Generally agree with @snario comments, may be useful to log the times these test took to run, so we can use them as a benchmark.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 3, 2021

Codecov Report

Merging #971 (2f7f1a1) into develop (a75f05b) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #971   +/-   ##
========================================
  Coverage    82.26%   82.26%           
========================================
  Files           49       49           
  Lines         1900     1900           
  Branches       303      303           
========================================
  Hits          1563     1563           
  Misses         337      337           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a75f05b...2f7f1a1. Read the comment docs.

@smartcontracts smartcontracts marked this pull request as ready for review June 3, 2021 22:12
@smartcontracts smartcontracts marked this pull request as draft June 17, 2021 16:55
@smartcontracts smartcontracts force-pushed the kelvin/load-tests-1 branch 2 times, most recently from 4fcaf56 to 2839249 Compare July 6, 2021 18:52
@smartcontracts smartcontracts marked this pull request as ready for review July 6, 2021 20:23
@smartcontracts smartcontracts changed the title feat[integration-tests]: add new load tests feat[integration-tests]: add basic stress tests Jul 6, 2021
Comment on lines +54 to +56
{
gasPrice: 0,
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it possible to run these tests with nonzero gas price? Perhaps this could be an extension issue to improve these tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not yet :-/ definitely could be an extension issue though.

"test:integration": "hardhat --network optimism test",
"test:integration:live": "IS_LIVE_NETWORK=true hardhat --network optimism-live test",
"test:sync": "hardhat --network optimism test sync-tests/*.spec.ts --no-compile",
"test:load": "hardhat --network optimism test load-tests/*.spec.ts --no-compile",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe test:concurrency? We should be careful to not overload the term "load"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Instead just made this file part of the standard integration tests.

@smartcontracts smartcontracts force-pushed the kelvin/load-tests-1 branch 4 times, most recently from ab20587 to 69be710 Compare July 8, 2021 13:16
@smartcontracts smartcontracts merged commit 376ce7b into develop Jul 8, 2021
@smartcontracts smartcontracts deleted the kelvin/load-tests-1 branch July 8, 2021 15:59
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.

5 participants