Rename unittest for flowgraph (#7794)

Signed-off-by: yhmo <yihua.mo@zilliz.com>
pull/7804/head
groot 2021-09-13 16:34:26 +08:00 committed by GitHub
parent 203010524d
commit c242b8bb25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -203,7 +203,7 @@ func createExampleFlowGraph() (*TimeTickedFlowGraph, chan float64, chan float64,
return fg, inputChan, outputChan, cancel
}
func TestTimeTickedFlowGraphAddNode(t *testing.T) {
func TestTimeTickedFlowGraph_AddNode(t *testing.T) {
const MaxQueueLength = 1024
inputChan := make(chan float64, MaxQueueLength)
@ -227,7 +227,7 @@ func TestTimeTickedFlowGraphAddNode(t *testing.T) {
assert.Equal(t, len(fg.nodeCtx), 2)
}
func TestTimeTickedFlowGraphSetEdges(t *testing.T) {
func TestTimeTickedFlowGraph_SetEdges(t *testing.T) {
const MaxQueueLength = 1024
inputChan := make(chan float64, MaxQueueLength)
@ -279,7 +279,7 @@ func TestTimeTickedFlowGraphSetEdges(t *testing.T) {
assert.Error(t, err)
}
func TestTimeTickedFlowGraphStart(t *testing.T) {
func TestTimeTickedFlowGraph_Start(t *testing.T) {
fg, inputChan, outputChan, cancel := createExampleFlowGraph()
defer cancel()
go fg.Start()
@ -300,7 +300,7 @@ func TestTimeTickedFlowGraphStart(t *testing.T) {
time.Sleep(50 * time.Millisecond)
}
func TestTimeTickedFlowGraphClose(t *testing.T) {
func TestTimeTickedFlowGraph_Close(t *testing.T) {
fg, _, _, cancel := createExampleFlowGraph()
defer cancel()
fg.Close()

View File

@ -68,7 +68,7 @@ func TestInputNode(t *testing.T) {
waitGroup.Wait()
}
func TestNewInputNode(t *testing.T) {
func Test_NewInputNode(t *testing.T) {
nodeName := "input_node"
var maxQueueLength int32 = 0
var maxParallelism int32 = 100

View File

@ -71,7 +71,7 @@ func (bm *MockMsg) SetPosition(position *MsgPosition) {
}
func TestGenerateMsgStreamMsg(t *testing.T) {
func Test_GenerateMsgStreamMsg(t *testing.T) {
messages := make([]msgstream.TsMsg, 1)
messages[0] = &MockMsg{
Ctx: context.TODO(),

View File

@ -49,7 +49,7 @@ func generateMsgPack() msgstream.MsgPack {
return msgPack
}
func TestNodeStart(t *testing.T) {
func TestNodeCtx_Start(t *testing.T) {
os.Setenv("ROCKSMQ_PATH", "/tmp/MilvusTest/FlowGraph/TestNodeStart")
msFactory := msgstream.NewRmsFactory()
m := map[string]interface{}{}