Actual behavior A clear and concise description of what the bug is.
=== RUN Test_queryResolver_SellersByStatus
========== My Debug Print
context.Background
sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true
==========My Debug Print
=== RUN Test_queryResolver_SellersByStatus/TestCase_1
--- PASS: Test_queryResolver_SellersByStatus (0.00s)
--- PASS: Test_queryResolver_SellersByStatus/TestCase_1 (0.00s)
PASS
ok gateway_msvc/query/gty_qry_bo/graph 0.547s
Expected behavior A clear and concise description of what you expected to
happen.
Running tool: /usr/local/go/bin/go test -timeout 30s -run ^Test_queryResolver_SellersByStatus$ query/gty_qry_bo/graph
=== RUN Test_queryResolver_SellersByStatus
=== RUN Test_queryResolver_SellersByStatus/TestCase_1
sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true
=== CONT Test_queryResolver_SellersByStatus
graph/schema.resolvers.go:56: Unexpected call to mocks.MockBoQueryClient.GetSellersByStatus([context.Background sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true]) at gty_qry_bo/graph/schema.resolvers.go:56 because:
expected call at /gty_qry_bo/graph/internal_schema.resolvers_test.go:52 doesn't match the argument at index 1.
Got: sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true (generated.SellersByStatusRequest)
Want: is equal to sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true (generated.SellersByStatusRequest)
expected call at /graph/internal_schema.resolvers_test.go:64 doesn't match the argument at index 1.
Got: sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true (generated.SellersByStatusRequest)
Want: is equal to sam_id:"2" status:"PFA" per_page:2 page_no:2 count:true (generated.SellersByStatusRequest)
=== CONT Test_queryResolver_SellersByStatus/TestCase_1
/graph/testing.go:1169: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test
=== CONT Test_queryResolver_SellersByStatus
gty_qry_bo/graph/controller.go:137: missing call(s) to mocks.MockBoQueryClient.GetSellersByStatus(is equal to context.Background (context.emptyCtx), is equal to sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true (generated.SellersByStatusRequest)) gty_qry_bo/graph/internal_schema.resolvers_test.go:52
gty_qry_bo/graph/controller.go:137: missing call(s) to mocks.MockBoQueryClient.GetSellersByStatus(is equal to context.Background (context.emptyCtx), is equal to sam_id:"2" status:"PFA" per_page:2 page_no:2 count:true (*generated.SellersByStatusRequest)) gty_qry_bo/graph/internal_schema.resolvers_test.go:64
gty_qry_bo/graph/controller.go:137: aborting test due to missing call(s)
--- FAIL: Test_queryResolver_SellersByStatus (0.00s)
--- FAIL: Test_queryResolver_SellersByStatus/TestCase_1 (0.00s)
FAIL
FAIL gateway_msvc/query/gty_qry_bo/graph 0.464s
To Reproduce Steps to reproduce the behavior
Write mock test for function contains int64 as a argument.
and execute the test case.
Strange Thing is if I add fmt.Println() in generated mock file/recorder function all the test cases are passed.
Additional Information
gomock mode (reflect or source):
gomock version or git ref: github.com/golang/mock v1.6.0
Actual behavior A clear and concise description of what the bug is.
=== RUN Test_queryResolver_SellersByStatus ========== My Debug Print context.Background sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true ==========My Debug Print === RUN Test_queryResolver_SellersByStatus/TestCase_1 --- PASS: Test_queryResolver_SellersByStatus (0.00s) --- PASS: Test_queryResolver_SellersByStatus/TestCase_1 (0.00s) PASS ok gateway_msvc/query/gty_qry_bo/graph 0.547s
Expected behavior A clear and concise description of what you expected to happen.
Running tool: /usr/local/go/bin/go test -timeout 30s -run ^Test_queryResolver_SellersByStatus$ query/gty_qry_bo/graph
=== RUN Test_queryResolver_SellersByStatus === RUN Test_queryResolver_SellersByStatus/TestCase_1 sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true === CONT Test_queryResolver_SellersByStatus graph/schema.resolvers.go:56: Unexpected call to mocks.MockBoQueryClient.GetSellersByStatus([context.Background sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true]) at gty_qry_bo/graph/schema.resolvers.go:56 because: expected call at /gty_qry_bo/graph/internal_schema.resolvers_test.go:52 doesn't match the argument at index 1. Got: sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true (generated.SellersByStatusRequest) Want: is equal to sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true (generated.SellersByStatusRequest) expected call at /graph/internal_schema.resolvers_test.go:64 doesn't match the argument at index 1. Got: sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true (generated.SellersByStatusRequest) Want: is equal to sam_id:"2" status:"PFA" per_page:2 page_no:2 count:true (generated.SellersByStatusRequest) === CONT Test_queryResolver_SellersByStatus/TestCase_1 /graph/testing.go:1169: test executed panic(nil) or runtime.Goexit: subtest may have called FailNow on a parent test === CONT Test_queryResolver_SellersByStatus gty_qry_bo/graph/controller.go:137: missing call(s) to mocks.MockBoQueryClient.GetSellersByStatus(is equal to context.Background (context.emptyCtx), is equal to sam_id:"2" status:"PFA" per_page:2 page_no:1 count:true (generated.SellersByStatusRequest)) gty_qry_bo/graph/internal_schema.resolvers_test.go:52 gty_qry_bo/graph/controller.go:137: missing call(s) to mocks.MockBoQueryClient.GetSellersByStatus(is equal to context.Background (context.emptyCtx), is equal to sam_id:"2" status:"PFA" per_page:2 page_no:2 count:true (*generated.SellersByStatusRequest)) gty_qry_bo/graph/internal_schema.resolvers_test.go:64 gty_qry_bo/graph/controller.go:137: aborting test due to missing call(s) --- FAIL: Test_queryResolver_SellersByStatus (0.00s) --- FAIL: Test_queryResolver_SellersByStatus/TestCase_1 (0.00s) FAIL FAIL gateway_msvc/query/gty_qry_bo/graph 0.464s
To Reproduce Steps to reproduce the behavior
Additional Information
Triage Notes for the Maintainers