lichao
2021-04-26 bcd780993c176b93f7393607f8003adf66e6676a
api/bhsgo/bhome_node_test.go
@@ -1,11 +1,12 @@
package bhsgo
import (
   bh "basic.com/valib/bhshmq.git/proto/source/bhome_msg"
   "fmt"
   "testing"
   "time"
   "unsafe"
   bh "basic.com/valib/bhshmq.git/proto/source/bhome_msg"
)
func ServerCallback(src unsafe.Pointer, proc_id *string, req *bh.MsgRequestTopic) {
@@ -37,6 +38,21 @@
      t.Log("register error")
      return
   }
   r = Unregister(&proc, &reply, 1000)
   if r {
      fmt.Println("Unregister ok")
   } else {
      fmt.Println("Unregister failed")
   }
   r = Register(&proc, &reply, 1000)
   if r {
      fmt.Println("register ok")
   } else {
      fmt.Println("register failed")
      t.Log("register error")
      return
   }
   r = HeartbeatEasy(1000)
   if r {