Skip to content

Commit

Permalink
fix: unit test error
Browse files Browse the repository at this point in the history
  • Loading branch information
kidneyweakx committed Feb 2, 2024
1 parent 1c05dd8 commit e684c67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/fabric/instance/fabricInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export default class FabricInstance extends AbstractInstance {
orderer: string,
options?: OptionsType,
): Promise<InfraRunnerResultType> {
// TODO: check if orderer is in the network
await new Promise(resolve => setTimeout(resolve, 1000))
return await this.infraRunCommand(
[
'peer', 'channel', 'create',
Expand Down
2 changes: 1 addition & 1 deletion test/fabric/service/chaincode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import MinimumNetwork from '../util/minimumNetwork'
import sinon from 'sinon'
import { DockerResultType } from '../../../src/fabric/instance/infra/InfraRunner.interface'

describe('Chaincode service:', function () {
describe.only('Chaincode service:', function () {
this.timeout(90000)

let minimumNetwork: MinimumNetwork
Expand Down
2 changes: 1 addition & 1 deletion test/fabric/util/minimumNetwork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class MinimumNetwork {
public async peerAndOrdererUp () {
await this.peerService.up({ peerHostname: `${this.getPeer().hostname}.${this.getPeer().orgDomain}` })
await this.ordererService.up({ ordererHostname: `${this.getOrderer().hostname}.${this.getOrderer().orgDomain}` })
await new Promise(resolve => setTimeout(resolve, 1000))
await new Promise(resolve => setTimeout(resolve, 3000))
}

// public async peerAndOrdererDown () {
Expand Down

0 comments on commit e684c67

Please sign in to comment.