Skip to content

Commit 1685b05

Browse files
committed
fix: Adding timeout to beforeEach for algorand fixture to prevent intermittent timeouts
1 parent 7b40e9f commit 1685b05

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

docs/code/modules/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ By default it tests against a default LocalNet instance, but you can pass in an
6161
```typescript
6262
const algorand = algorandFixture()
6363

64-
beforeEach(algorand.beforeEach)
64+
beforeEach(algorand.beforeEach, 10_000)
6565

6666
test('My test', () => {
6767
const {algod, indexer, testAccount, ...} = algorand.context

src/account.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { algorandFixture } from './testing'
66
describe('account', () => {
77
const localnet = algorandFixture()
88

9-
beforeEach(localnet.beforeEach)
9+
beforeEach(localnet.beforeEach, 10_000)
1010

1111
test('New account is retrieved and funded', async () => {
1212
const { algod, kmd } = localnet.context

src/deploy-app.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { AppDeployMetadata } from './types/app'
88

99
describe('deploy-app', () => {
1010
const localnet = algorandFixture()
11-
beforeEach(localnet.beforeEach)
11+
beforeEach(localnet.beforeEach, 10_000)
1212

1313
const logging = algoKitLogCaptureFixture()
1414
beforeEach(logging.beforeEach)

src/indexer-lookup.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { algorandFixture } from './testing'
66

77
describe('indexer-lookup', () => {
88
const localnet = algorandFixture()
9-
beforeEach(localnet.beforeEach)
9+
beforeEach(localnet.beforeEach, 10_000)
1010

1111
const getTestTransaction = async (amount?: number, from?: string) => {
1212
return algosdk.makePaymentTxnWithSuggestedParamsFromObject({

src/testing/fixtures/algorand-fixture.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { AlgorandFixture, AlgorandFixtureConfig, AlgorandTestAutomationContext,
99
* @example ```typescript
1010
* const algorand = algorandFixture()
1111
*
12-
* beforeEach(algorand.beforeEach)
12+
* beforeEach(algorand.beforeEach, 10_000)
1313
*
1414
* test('My test', () => {
1515
* const {algod, indexer, testAccount, ...} = algorand.context

src/transaction.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Arc2TransactionNote } from './types/transaction'
77

88
describe('transaction', () => {
99
const localnet = algorandFixture()
10-
beforeEach(localnet.beforeEach)
10+
beforeEach(localnet.beforeEach, 10_000)
1111

1212
const getTestTransaction = async (amount?: number, sender?: string) => {
1313
return algosdk.makePaymentTxnWithSuggestedParamsFromObject({

src/transfer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { algorandFixture } from './testing'
55

66
describe('transfer', () => {
77
const localnet = algorandFixture()
8-
beforeEach(localnet.beforeEach)
8+
beforeEach(localnet.beforeEach, 10_000)
99

1010
test('Transfer is sent and waited for', async () => {
1111
const { algod, testAccount } = localnet.context

src/types/application-client.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { AppSpec } from './appspec'
88

99
describe('application-client', () => {
1010
const localnet = algorandFixture()
11-
beforeEach(localnet.beforeEach)
11+
beforeEach(localnet.beforeEach, 10_000)
1212

1313
let appSpec: AppSpec
1414
beforeAll(async () => {

0 commit comments

Comments
 (0)