File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import (
34
34
)
35
35
36
36
const (
37
- shimRespChanLen = 100
37
+ shimRespChanLen = 10000
38
38
)
39
39
40
40
// ShimServiceClient is the client interface to a cluster shim.
Original file line number Diff line number Diff line change @@ -103,7 +103,6 @@ func (e *edgeHandler) Start() error {
103
103
return fmt .Errorf ("fail to init shim client" )
104
104
}
105
105
106
- go e .handleRespFromShimClient ()
107
106
e .edgeTunnel = tunnel .NewEdgeTunnel (e .conf )
108
107
e .edgeTunnel .RegistReceiveMessageHandler (e .receiveMessageFromTunnel )
109
108
e .edgeTunnel .RegistAfterConnectToHook (e .afterConnect )
@@ -112,6 +111,8 @@ func (e *edgeHandler) Start() error {
112
111
return err
113
112
}
114
113
114
+ go e .handleRespFromShimClient ()
115
+
115
116
go e .sendMessageToTunnel ()
116
117
return nil
117
118
}
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import (
31
31
"github.com/baidu/ote-stack/pkg/clustershim"
32
32
"github.com/baidu/ote-stack/pkg/config"
33
33
oteclient "github.com/baidu/ote-stack/pkg/generated/clientset/versioned"
34
+ "github.com/baidu/ote-stack/pkg/generated/clientset/versioned/fake"
34
35
"github.com/baidu/ote-stack/pkg/tunnel"
35
36
)
36
37
@@ -489,6 +490,25 @@ func TestStart(t *testing.T) {
489
490
},
490
491
ExpectErr : true ,
491
492
},
493
+ {
494
+ Name : "shim is ready" ,
495
+ Conf : & config.ClusterControllerConfig {
496
+ ClusterName : "child" ,
497
+ ClusterUserDefineName : "child" ,
498
+ K8sClient : fake .NewSimpleClientset (),
499
+ ParentCluster : "127.0.0.1:8287" ,
500
+ KubeConfig : "" ,
501
+ TunnelListenAddr : "test" ,
502
+ },
503
+ ExpectErr : false ,
504
+ },
505
+ }
506
+
507
+ ctInter := tunnel .NewCloudTunnel ("127.0.0.1:8287" )
508
+
509
+ err := ctInter .Start ()
510
+ if err != nil {
511
+ t .Errorf ("start cloud tunnel failed" )
492
512
}
493
513
494
514
for _ , ct := range casetest {
You can’t perform that action at this time.
草字头的字和什么有关hcv8jop7ns8r.cn
梦见大便是什么预兆hcv8jop8ns4r.cn
尿激酶的作用及功效是什么hcv9jop2ns5r.cn
动脉硬化吃什么可以软化血管hcv9jop1ns9r.cn
鼓上蚤是什么意思hcv8jop9ns5r.cn
蜂蜜不能和什么食物一起吃hebeidezhi.com
7月13日什么星座hcv9jop4ns0r.cn
面色少华是什么意思hcv9jop4ns8r.cn
明朝为什么会灭亡hcv8jop0ns9r.cn
置之不理的置是什么意思hcv9jop1ns5r.cn
刑警队是干什么的chuanglingweilai.com
脚踝浮肿是什么原因hcv7jop6ns2r.cn
桃园三结义是什么意思chuanglingweilai.com
去医院测血糖挂什么科hcv8jop0ns5r.cn
螃蟹不能和什么水果一起吃clwhiglsz.com
梓树为什么叫梧桐树hcv9jop0ns0r.cn
女人脚肿是什么原因hcv9jop5ns2r.cn
多字五行属什么hcv9jop7ns0r.cn
nbc是什么意思kuyehao.com
益母草颗粒什么时候喝hcv7jop6ns9r.cn
0 commit comments