You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
351 B
22 lines
351 B
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) |
|
}
|
|
|