feat: call the HTTP API to get master state information

This commit is contained in:
徐聪
2022-07-25 21:30:01 +08:00
parent 17617ee13e
commit f2799aef53
4 changed files with 51 additions and 11 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"time"
"github.com/httprunner/httprunner/v4/hrp/internal/boomer/grpc/messager"
"github.com/httprunner/httprunner/v4/hrp/internal/builtin"
"github.com/stretchr/testify/assert"
)
@@ -529,7 +530,7 @@ func TestHeartbeatWorker(t *testing.T) {
runner.server.recvChannel() <- &genericMessage{
Type: typeHeartbeat,
NodeID: "testID2",
Data: map[string]int64{"state": 3},
Data: map[string][]byte{"state": builtin.Int64ToBytes(3)},
}
worker2, ok := runner.server.getClients().Load("testID2")
if !ok {