+/*flush channel with timeout*/
+func flushChannelExec(channel chan xsapiv1.ExecOutMsg, ms time.Duration) {
+ timeoutB := false
+ for !timeoutB {
+ select {
+ case <-channel:
+ case <-time.After(ms * time.Millisecond):
+ timeoutB = true
+ }
+ }
+}
+func TestExec(t *testing.T) {
+ helloworldDir := InitExec(t)
+ /*channel for SDK events*/
+ chSdks := make(chan xsapiv1.SDK)
+ defer close(chSdks)
+ sdk := xsapiv1.SDKInstallArgs{
+ ID: "",
+ Filename: sdkFileName,
+ Force: false,
+ }
+ ConnectSDKStateChange(t, sCli, chSdks)
+ sdkRes := installFakeSdk(t, sdk, chSdks)