mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-16 05:26:06 +08:00
@@ -27,7 +27,6 @@
|
||||
package component
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -84,7 +83,8 @@ func TestLoop_InvokeIsNoOp(t *testing.T) {
|
||||
{"variable": "counter", "input_mode": "constant", "value": 7, "type": "number"},
|
||||
},
|
||||
})
|
||||
out, err := c.Invoke(context.Background(), nil, map[string]any{"in": 1})
|
||||
ctx := t.Context()
|
||||
out, err := c.Invoke(ctx, nil, map[string]any{"in": 1})
|
||||
if err != nil {
|
||||
t.Fatalf("Invoke: %v", err)
|
||||
}
|
||||
@@ -97,7 +97,8 @@ func TestLoop_InvokeIsNoOp(t *testing.T) {
|
||||
// empty-map chunk and closes.
|
||||
func TestLoop_StreamMirrorsInvoke(t *testing.T) {
|
||||
c := NewLoopComponent(loopParam{})
|
||||
ch, err := c.Stream(context.Background(), nil, nil)
|
||||
ctx := t.Context()
|
||||
ch, err := c.Stream(ctx, nil, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("Stream: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user