Skip to content

Commit ee770fe

Browse files
committed
Revert "Speed up tests 5 times"
This reverts commit 9ec8ddf.
1 parent 241367c commit ee770fe

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

test/integration/chain.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('Node Chain', function () {
5454

5555
it('waits for specified heights', async () => {
5656
const target = await client.height() + 1
57-
await client.awaitHeight(target, { interval: 200, attempts: 100 }).should.eventually.be.at.least(target)
57+
await client.awaitHeight(target, { attempts: 120 }).should.eventually.be.at.least(target)
5858
return client.height().should.eventually.be.at.least(target)
5959
})
6060
it('Can verify transaction from broadcast error', async () => {
@@ -109,17 +109,17 @@ describe('Node Chain', function () {
109109
const signed = await client.signTransaction(tx)
110110
const { txHash } = await client.api.postTransaction({ tx: signed })
111111

112-
await client.poll(txHash, { interval: 50, attempts: 1200 }).should.eventually.be.fulfilled
113-
return client.poll('th_xxx', { blocks: 1, interval: 50, attempts: 1200 }).should.eventually.be.rejected
112+
await client.poll(txHash).should.eventually.be.fulfilled
113+
return client.poll('th_xxx', { blocks: 1 }).should.eventually.be.rejected
114114
})
115115

116116
it('Wait for transaction confirmation', async () => {
117-
const txData = await client.spend(1000, await client.address(), { confirm: true, interval: 400, attempts: 50 })
117+
const txData = await client.spend(1000, await client.address(), { confirm: true })
118118
const isConfirmed = (await client.height()) >= txData.blockHeight + 3
119119

120120
isConfirmed.should.be.equal(true)
121121

122-
const txData2 = await client.spend(1000, await client.address(), { confirm: 4, interval: 400, attempts: 50 })
122+
const txData2 = await client.spend(1000, await client.address(), { confirm: 4 })
123123
const isConfirmed2 = (await client.height()) >= txData2.blockHeight + 4
124124
isConfirmed2.should.be.equal(true)
125125
})

test/integration/contract.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,13 @@ describe('Contract', function () {
392392

393393
it('call contract/deploy with `waitMined: false`', async () => {
394394
const deployed = await bytecode.deploy([], { waitMined: false })
395-
await contract.poll(deployed.transaction, { interval: 50, attempts: 1200 })
395+
await contract.poll(deployed.transaction)
396396
Boolean(deployed.result === undefined).should.be.equal(true)
397397
Boolean(deployed.txData === undefined).should.be.equal(true)
398398
const result = await deployed.call('main', ['42'], { waitMined: false, verify: false })
399399
Boolean(result.result === undefined).should.be.equal(true)
400400
Boolean(result.txData === undefined).should.be.equal(true)
401-
await contract.poll(result.hash, { interval: 50, attempts: 1200 })
401+
await contract.poll(result.hash)
402402
})
403403

404404
it('calls deployed contracts static', async () => {
@@ -645,13 +645,13 @@ describe('Contract', function () {
645645
})
646646
it('Deploy/Call contract with { waitMined: false }', async () => {
647647
const deployed = await contractObject.methods.init('123', 1, 'hahahaha', { waitMined: false })
648-
await contract.poll(deployed.transaction, { interval: 50, attempts: 1200 })
648+
await contract.poll(deployed.transaction)
649649
Boolean(deployed.result === undefined).should.be.equal(true)
650650
Boolean(deployed.txData === undefined).should.be.equal(true)
651651
const result = await contractObject.methods.intFn.send(2, { waitMined: false })
652652
Boolean(result.result === undefined).should.be.equal(true)
653653
Boolean(result.txData === undefined).should.be.equal(true)
654-
await contract.poll(result.hash, { interval: 50, attempts: 1200 })
654+
await contract.poll(result.hash)
655655
})
656656
it('Generate ACI object with corresponding bytecode', async () => {
657657
await contract.getContractInstance(testContract, { contractAddress: contractObject.deployInfo.address, filesystem, opt: { ttl: 0 } })

test/integration/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const account = Crypto.generateKeyPair()
3434

3535
export const BaseAe = async (params = {}) => {
3636
const ae = await Universal.waitMined(true).compose({
37-
deepProps: { Ae: { defaults: { interval: 50, attempts: 1200 } }, Swagger: { defaults: { debug: !!process.env.DEBUG } } },
37+
deepProps: { Swagger: { defaults: { debug: !!process.env.DEBUG } } },
3838
props: { process, compilerUrl }
3939
})({
4040
...params,

0 commit comments

Comments
 (0)