* fix: heartbeat/service_test.go test failed
This commit is contained in:
parent
7f60392d88
commit
878650c459
1 changed files with 4 additions and 4 deletions
|
|
@ -17,7 +17,7 @@ func TestExecuteHeartbeat_Async(t *testing.T) {
|
|||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
hs := NewHeartbeatService(tmpDir, 30, true)
|
||||
hs.started = true // Enable for testing
|
||||
hs.stopChan = make(chan struct{}) // Enable for testing
|
||||
|
||||
asyncCalled := false
|
||||
asyncResult := &tools.ToolResult{
|
||||
|
|
@ -55,7 +55,7 @@ func TestExecuteHeartbeat_Error(t *testing.T) {
|
|||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
hs := NewHeartbeatService(tmpDir, 30, true)
|
||||
hs.started = true // Enable for testing
|
||||
hs.stopChan = make(chan struct{}) // Enable for testing
|
||||
|
||||
hs.SetHandler(func(prompt, channel, chatID string) *tools.ToolResult {
|
||||
return &tools.ToolResult{
|
||||
|
|
@ -93,7 +93,7 @@ func TestExecuteHeartbeat_Silent(t *testing.T) {
|
|||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
hs := NewHeartbeatService(tmpDir, 30, true)
|
||||
hs.started = true // Enable for testing
|
||||
hs.stopChan = make(chan struct{}) // Enable for testing
|
||||
|
||||
hs.SetHandler(func(prompt, channel, chatID string) *tools.ToolResult {
|
||||
return &tools.ToolResult{
|
||||
|
|
@ -167,7 +167,7 @@ func TestExecuteHeartbeat_NilResult(t *testing.T) {
|
|||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
hs := NewHeartbeatService(tmpDir, 30, true)
|
||||
hs.started = true // Enable for testing
|
||||
hs.stopChan = make(chan struct{}) // Enable for testing
|
||||
|
||||
hs.SetHandler(func(prompt, channel, chatID string) *tools.ToolResult {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue