From 8e1bb176bd876b224df53c104fc8561c30109229 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Tue, 24 Oct 2023 08:38:25 -0300 Subject: [PATCH] refactor: remove manually set timeouts in favor of config --- subgraphs/isolated-pools/tests/integration/pool.ts | 1 - subgraphs/isolated-pools/tests/integration/poolRegistry.ts | 2 -- subgraphs/isolated-pools/tests/integration/setup.ts | 1 - subgraphs/isolated-pools/tests/integration/vTokens.ts | 2 -- .../tests/integration/accessControlManager.ts | 2 -- subgraphs/venus-governance/tests/integration/alpha.ts | 4 ---- subgraphs/venus-governance/tests/integration/bravo.ts | 1 - subgraphs/venus-governance/tests/integration/setup.ts | 1 - subgraphs/venus-governance/tests/integration/xvsVault.ts | 1 - 9 files changed, 15 deletions(-) diff --git a/subgraphs/isolated-pools/tests/integration/pool.ts b/subgraphs/isolated-pools/tests/integration/pool.ts index 714a67d0..df1d9e36 100644 --- a/subgraphs/isolated-pools/tests/integration/pool.ts +++ b/subgraphs/isolated-pools/tests/integration/pool.ts @@ -15,7 +15,6 @@ describe('Pools', function () { const syncDelay = 6000; before(async function () { - this.timeout(500000); // sometimes it takes a long time const signers = await ethers.getSigners(); [root] = await ethers.getSigners(); acc1 = signers[1]; diff --git a/subgraphs/isolated-pools/tests/integration/poolRegistry.ts b/subgraphs/isolated-pools/tests/integration/poolRegistry.ts index c753ab91..27289da2 100644 --- a/subgraphs/isolated-pools/tests/integration/poolRegistry.ts +++ b/subgraphs/isolated-pools/tests/integration/poolRegistry.ts @@ -19,8 +19,6 @@ describe('Pool Registry', function () { const syncDelay = 2000; before(async function () { - this.timeout(500000); // sometimes it takes a long time - [root] = await ethers.getSigners(); poolRegistry = await ethers.getContract('PoolRegistry'); diff --git a/subgraphs/isolated-pools/tests/integration/setup.ts b/subgraphs/isolated-pools/tests/integration/setup.ts index 85e73d98..c404b06a 100644 --- a/subgraphs/isolated-pools/tests/integration/setup.ts +++ b/subgraphs/isolated-pools/tests/integration/setup.ts @@ -4,7 +4,6 @@ import { SUBGRAPH_ACCOUNT, SUBGRAPH_NAME, SYNC_DELAY } from './constants'; describe('Deploy Subgraph', function () { it('should deploy subgraph', async function () { - this.timeout(500000); // sometimes it takes a long time const root = `${__dirname}/../..`; await deploy({ diff --git a/subgraphs/isolated-pools/tests/integration/vTokens.ts b/subgraphs/isolated-pools/tests/integration/vTokens.ts index e604ff14..d5a3fd50 100644 --- a/subgraphs/isolated-pools/tests/integration/vTokens.ts +++ b/subgraphs/isolated-pools/tests/integration/vTokens.ts @@ -31,8 +31,6 @@ describe('VToken events', function () { const borrowAmount = scaleValue(0.000025, 18); before(async function () { - this.timeout(500000); // sometimes it takes a long time - const signers = await ethers.getSigners(); [_root, liquidator, borrower, liquidator2, borrower2, supplier1, supplier2] = signers; diff --git a/subgraphs/venus-governance/tests/integration/accessControlManager.ts b/subgraphs/venus-governance/tests/integration/accessControlManager.ts index d4a32766..392b5a93 100644 --- a/subgraphs/venus-governance/tests/integration/accessControlManager.ts +++ b/subgraphs/venus-governance/tests/integration/accessControlManager.ts @@ -8,8 +8,6 @@ import { SYNC_DELAY } from './utils/constants'; describe('AccessControlManager', function () { before(async function () { - this.timeout(50000000); // sometimes it takes a long time - await waitForSubgraphToBeSynced(SYNC_DELAY); }); diff --git a/subgraphs/venus-governance/tests/integration/alpha.ts b/subgraphs/venus-governance/tests/integration/alpha.ts index 0d0f5116..a1452fb9 100644 --- a/subgraphs/venus-governance/tests/integration/alpha.ts +++ b/subgraphs/venus-governance/tests/integration/alpha.ts @@ -21,7 +21,6 @@ describe('GovernorAlpha', function () { let user4: SignerWithAddress; before(async function () { - this.timeout(10000000); // sometimes it takes a long time governorAlpha = await ethers.getContract('GovernorAlpha'); governorAlpha2 = await ethers.getContract('GovernorAlpha2'); signers = await ethers.getSigners(); @@ -121,9 +120,6 @@ describe('GovernorAlpha', function () { }); describe('Alpha2', function () { - before(async function () { - this.timeout(10000000); // sometimes it takes a long time - }); it('indexes created proposals - alpha2', async function () { const [_, user1] = signers; await enfranchiseAccount(user1, scaleValue(600000, 18)); diff --git a/subgraphs/venus-governance/tests/integration/bravo.ts b/subgraphs/venus-governance/tests/integration/bravo.ts index 3b13cc85..2ddf37fc 100644 --- a/subgraphs/venus-governance/tests/integration/bravo.ts +++ b/subgraphs/venus-governance/tests/integration/bravo.ts @@ -15,7 +15,6 @@ describe('GovernorBravo', function () { let governorBravoDelegator: Contract; before(async function () { - this.timeout(50000000); // sometimes it takes a long time signers = await ethers.getSigners(); governorBravoDelegator = await ethers.getContract('GovernorBravoDelegatorV1'); const governorBravoDelegateV1 = await ethers.getContract('GovernorBravoDelegateV1'); diff --git a/subgraphs/venus-governance/tests/integration/setup.ts b/subgraphs/venus-governance/tests/integration/setup.ts index b3b9d768..d1658cea 100644 --- a/subgraphs/venus-governance/tests/integration/setup.ts +++ b/subgraphs/venus-governance/tests/integration/setup.ts @@ -4,7 +4,6 @@ import { SUBGRAPH_ACCOUNT, SUBGRAPH_NAME, SYNC_DELAY } from './utils/constants'; describe('Deploy Subgraph', function () { it('should deploy subgraph', async function () { - this.timeout(600000); // sometimes it takes a long time const root = `${__dirname}/../..`; await deploy({ diff --git a/subgraphs/venus-governance/tests/integration/xvsVault.ts b/subgraphs/venus-governance/tests/integration/xvsVault.ts index ff7169da..ff5e818f 100644 --- a/subgraphs/venus-governance/tests/integration/xvsVault.ts +++ b/subgraphs/venus-governance/tests/integration/xvsVault.ts @@ -16,7 +16,6 @@ describe('XVS Vault and Delegation', function () { const amount = scaleValue(100000, 18); before(async function () { - this.timeout(50000000); // sometimes it takes a long time signers = await ethers.getSigners(); xvs = await ethers.getContract('XVS');