Skip to content

Commit ff67459

Browse files
committed
[core] Reduce integration plugin dial timeouts
1 parent 84940b1 commit ff67459

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/integration/dcs/plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
"google.golang.org/grpc/connectivity"
4444
)
4545

46-
const DCS_CALL_TIMEOUT = 10 * time.Second
46+
const DCS_DIAL_TIMEOUT = 2 * time.Second
4747

4848
type Plugin struct {
4949
dcsHost string
@@ -76,7 +76,7 @@ func (p *Plugin) GetName() string {
7676

7777
func (p *Plugin) Init(instanceId string) error {
7878
if p.dcsClient == nil {
79-
callTimeout := DCS_CALL_TIMEOUT
79+
callTimeout := DCS_DIAL_TIMEOUT
8080
cxt, cancel := context.WithTimeout(context.Background(), callTimeout)
8181
p.dcsClient = NewClient(cxt, cancel, viper.GetString("dcsServiceEndpoint"))
8282
if p.dcsClient == nil {

core/integration/ddsched/plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import (
4343
"google.golang.org/grpc/connectivity"
4444
)
4545

46-
const DDSCHED_CALL_TIMEOUT = 10 * time.Second
46+
const DDSCHED_DIAL_TIMEOUT = 2 * time.Second
4747

4848

4949
type Plugin struct {
@@ -82,7 +82,7 @@ func (p *Plugin) GetName() string {
8282

8383
func (p *Plugin) Init(_ string) error {
8484
if p.ddSchedClient == nil {
85-
callTimeout := DDSCHED_CALL_TIMEOUT
85+
callTimeout := DDSCHED_DIAL_TIMEOUT
8686
cxt, cancel := context.WithTimeout(context.Background(), callTimeout)
8787
p.ddSchedClient = NewClient(cxt, cancel, viper.GetString("ddSchedulerEndpoint"))
8888
if p.ddSchedClient == nil {

core/integration/odc/plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"github.com/spf13/viper"
4040
)
4141

42-
const ODC_CALL_TIMEOUT = 10 * time.Second
42+
const ODC_DIAL_TIMEOUT = 2 * time.Second
4343

4444

4545
type Plugin struct {
@@ -73,7 +73,7 @@ func (p *Plugin) GetName() string {
7373

7474
func (p *Plugin) Init(_ string) error {
7575
if p.odcClient == nil {
76-
callTimeout := ODC_CALL_TIMEOUT
76+
callTimeout := ODC_DIAL_TIMEOUT
7777
cxt, cancel := context.WithTimeout(context.Background(), callTimeout)
7878
p.odcClient = NewClient(cxt, cancel, viper.GetString("odcEndpoint"))
7979
if p.odcClient == nil {

0 commit comments

Comments
 (0)