-
Notifications
You must be signed in to change notification settings - Fork 19
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/e2e test improvements #2195
Conversation
@@ -0,0 +1,226 @@ | |||
import '@frequency-chain/api-augment'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved from transactions.test.ts
. No changes
@@ -1,10 +1,8 @@ | |||
import '@frequency-chain/api-augment'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only moved some tests to capacityFail.test.ts
. No other changes.
@@ -11,7 +11,7 @@ import { hasRelayChain } from '../scaffolding/env'; | |||
import { getFundingSource } from '../scaffolding/funding'; | |||
|
|||
const fundingSource = getFundingSource('handles'); | |||
const expirationOffset = hasRelayChain() ? 10 : 100; | |||
const expirationOffset = hasRelayChain() ? 4 : 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With testnet at 6s block times, this can be reduced
e2e/passkey/passkeyProxy.test.ts
Outdated
@@ -68,7 +68,7 @@ describe('Passkey Pallet Tests', function () { | |||
const passkeyPayload = await createPasskeyPayload(passKeyPrivateKey, passKeyPublicKey, passkeyCall, false); | |||
const passkeyProxy = ExtrinsicHelper.executePassKeyProxy(fundedKeys, passkeyPayload); | |||
assert.doesNotReject(passkeyProxy.fundAndSendUnsigned(fundingSource)); | |||
await ExtrinsicHelper.runToBlock(await getNextEpochBlock()); | |||
await ExtrinsicHelper.waitForFinalization(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bugfix. This should have been this all along.
while (currentBlock < blockNumber) { | ||
if (start + 48_000 < Date.now()) { | ||
throw new Error( | ||
`Waiting for Finalized Block took longer than 48s. Waiting for "${blockNumber.toString()}", Current: "${currentBlock.toString()}"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a life saver. Some of these were taking forever and it was really hard to track down. Now they are capped.
Goal
The goal of this PR is to add a final set of e2e test improvements to allow e2e tests to run against testnet again post async-backing
Closes #2154
Discussion
Testing