Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-15924

Unexpected method call in gossip/channel tests

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Medium
    • Resolution: Invalid: Works as Expected
    • None
    • None
    • fabric-gossip
    • (Please add steps to reproduce)

    Description

      panic: 
      
      mock: Unexpected Method Call
      -----------------------------
      
      GetIdentityByPKIID(common.PKIidType)
      		0: common.PKIidType{0x70, 0x6b, 0x69, 0x49, 0x44, 0x49, 0x6e, 0x4f, 0x72, 0x67, 0x31, 0x42, 0x75, 0x74, 0x4e, 0x6f, 0x74, 0x45, 0x6c, 0x69, 0x67, 0x69, 0x62, 0x6c, 0x65}
      
      The closest call I have is: 
      
      GetIdentityByPKIID(common.PKIidType)
      		0: common.PKIidType{0x70, 0x6b, 0x69, 0x49, 0x44, 0x49, 0x6e, 0x4f, 0x72, 0x67, 0x31}
      
      Difference found in argument 0:
      
      --- Expected
      +++ Actual
      @@ -1,2 +1,2 @@
      -(common.PKIidType) (len=11) 706b694944496e4f726731
      +(common.PKIidType) (len=25) 706b694944496e4f7267314275744e6f74456c696769626c65
       
      
      Diff: 0: FAIL:  (common.PKIidType=706b694944496e4f7267314275744e6f74456c696769626c65) != (common.PKIidType=706b694944496e4f726731)
      
      goroutine 29 [running]:
      github.com/hyperledger/fabric/vendor/github.com/stretchr/testify/mock.(*Mock).fail(0xc0001365b0, 0xfbd2fc, 0x6f, 0xc00024a1c0, 0x4, 0x4)
      	/w/workspace/fabric-verify-unit-tests-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/stretchr/testify/mock/mock.go:236 +0x14d
      github.com/hyperledger/fabric/vendor/github.com/stretchr/testify/mock.(*Mock).MethodCalled(0xc0001365b0, 0x15b7269, 0x12, 0xc0001ac2d0, 0x1, 0x1, 0xc00024a140, 0x4, 0x4)
      	/w/workspace/fabric-verify-unit-tests-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/stretchr/testify/mock/mock.go:358 +0x800
      github.com/hyperledger/fabric/vendor/github.com/stretchr/testify/mock.(*Mock).Called(0xc0001365b0, 0xc0001ac2d0, 0x1, 0x1, 0xc0001b1040, 0x36, 0x0)
      	/w/workspace/fabric-verify-unit-tests-x86_64/gopath/src/github.com/hyperledger/fabric/vendor/github.com/stretchr/testify/mock/mock.go:334 +0x1a9
      github.com/hyperledger/fabric/gossip/gossip/channel.(*gossipAdapterMock).GetIdentityByPKIID(0xc0001365b0, 0x17f7b10, 0x19, 0x19, 0x0, 0x0, 0x0)
      	/w/workspace/fabric-verify-unit-tests-x86_64/gopath/src/github.com/hyperledger/fabric/gossip/gossip/channel/channel_test.go:269 +0x116
      github.com/hyperledger/fabric/gossip/gossip/channel.(*gossipChannel).EligibleForChannel(0xc0002723c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x17f7b10, 0x19, 0x19, 0x0, ...)
      	/w/workspace/fabric-verify-unit-tests-x86_64/gopath/src/github.com/hyperledger/fabric/gossip/gossip/channel/channel.go:510 +0x68
      github.com/hyperledger/fabric/gossip/gossip/channel.(*gossipChannel).GetPeers(0xc0002723c0, 0x0, 0x0, 0x0)
      	/w/workspace/fabric-verify-unit-tests-x86_64/gopath/src/github.com/hyperledger/fabric/gossip/gossip/channel/channel.go:362 +0x157
      github.com/hyperledger/fabric/gossip/gossip/channel.(*membershipTracker).trackMembershipChanges(0xc000281800)
      	/w/workspace/fabric-verify-unit-tests-x86_64/gopath/src/github.com/hyperledger/fabric/gossip/gossip/channel/channel.go:1098 +0x49
      created by github.com/hyperledger/fabric/gossip/gossip/channel.NewGossipChannel
      	/w/workspace/fabric-verify-unit-tests-x86_64/gopath/src/github.com/hyperledger/fabric/gossip/gossip/channel/channel.go:296 +0xa52
      FAIL	github.com/hyperledger/fabric/gossip/gossip/channel	0.052s
      

      Observed in build for https://gerrit.hyperledger.org/r/c/fabric/+/32257: https://jenkins.hyperledger.org/job/fabric-verify-unit-tests-x86_64/13551/

      Attachments

        Activity

          People

            Unassigned Unassigned
            sykesm Matthew Sykes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: