Skip to content

Commit

Permalink
Merge pull request #101 from PrasadG193/fix-timeout-calc
Browse files Browse the repository at this point in the history
Fix timeout duration calculation
  • Loading branch information
k8s-ci-robot authored Jan 8, 2025
2 parents 925ae2b + 07228c0 commit 0a22fca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/sidecar/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (s *sidecarFlagSet) runtimeArgsToArgv(progName string, rta runtime.Args) []
func (s *sidecarFlagSet) createServerConfig(rt *runtime.Runtime) grpc.ServerConfig {
return grpc.ServerConfig{
Runtime: rt,
MaxStreamDur: time.Duration(*s.maxStreamingDurMin * 60),
MaxStreamDur: time.Duration(*s.maxStreamingDurMin) * time.Minute,
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/sidecar/sidecar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func TestSidecarFlagSet(t *testing.T) {
rt := &runtime.Runtime{}
config := sfs.createServerConfig(rt)
assert.Equal(t, rt, config.Runtime)
assert.Equal(t, time.Duration(defaultMaxStreamingDurationMin*60), config.MaxStreamDur)
assert.Equal(t, time.Duration(defaultMaxStreamingDurationMin)*time.Minute, config.MaxStreamDur)
})
}

Expand Down

0 comments on commit 0a22fca

Please sign in to comment.