hpds_node/sf_test.go

23 lines
351 B
Go
Raw Normal View History

2022-10-12 11:55:36 +08:00
package hpds_node
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestSfConnectToServer(t *testing.T) {
sf := NewStreamFunction(
"test-sf",
WithMqAddr("localhost:9000"),
WithObserveDataTags(0x33),
)
defer sf.Close()
// set handler
_ = sf.SetHandler(nil)
// connect to server
err := sf.Connect()
assert.Nil(t, err)
}