Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
bojand committed Nov 19, 2020
1 parent e7a3a63 commit 5b0f16f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ issues:

# Debug log Sync() error check in defer in main
- path: cmd/ghz/main.go
text: "Error return value of `logger.Sync` is not checked"
text: "Error return value of `logger.Sync` is not checked"

- path: runner/requester.go
text: "SA1019: grpc.WithBalancerName"
4 changes: 2 additions & 2 deletions runner/options_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func TestRunConfig_newRunConfig(t *testing.T) {
WithCPUs(4),
WithBinaryData([]byte("asdf1234foobar")),
WithBinaryDataFunc(changeFunc),
WithClientLoadBalancing(`{"loadBalancingPolicy":"round_robin"}`),
WithClientLoadBalancing("round_robin"),
WithMetadataFromFile("../testdata/metadata.json"),
WithProtoset("testdata/bundle.protoset"),
)
Expand All @@ -153,7 +153,7 @@ func TestRunConfig_newRunConfig(t *testing.T) {
assert.Equal(t, 4, c.cpus)
assert.Equal(t, "asdf", c.name)
assert.Equal(t, []byte("asdf1234foobar"), c.data)
assert.Equal(t, `{"loadBalancingPolicy":"round_robin"}`, c.lbStrategy)
assert.Equal(t, "round_robin", c.lbStrategy)
funcName1 := runtime.FuncForPC(reflect.ValueOf(changeFunc).Pointer()).Name()
funcName2 := runtime.FuncForPC(reflect.ValueOf(c.dataFunc).Pointer()).Name()
assert.Equal(t, funcName1, funcName2)
Expand Down

0 comments on commit 5b0f16f

Please sign in to comment.