fix
This commit is contained in:
parent
3ba0a631bd
commit
456dae6409
2
go.mod
2
go.mod
|
@ -4,7 +4,7 @@ go 1.20
|
|||
|
||||
require (
|
||||
github.com/474420502/execute v0.2.2
|
||||
github.com/474420502/passer v0.0.3
|
||||
github.com/474420502/passer v0.0.4
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
github.com/lni/dragonboat/v4 v4.0.0-20230709075559-54497b9553be
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -2,8 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
|
|||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/474420502/execute v0.2.2 h1:Hzzb/HFa/urRvi3xWe+p/DnJgRyxXFVyEBEXbbITy/E=
|
||||
github.com/474420502/execute v0.2.2/go.mod h1:wkKeKBIXYp7T844eU1YS2nPvFj8lra4VRcQYnWyXej4=
|
||||
github.com/474420502/passer v0.0.3 h1:ACsKTcAdzjC+LA88me37WYNYr8QzlNLI2dRpLhhyiJQ=
|
||||
github.com/474420502/passer v0.0.3/go.mod h1:MmnnrF9d51sPkFzdRq2pQtxQKqyjburVM1LjMbOCezE=
|
||||
github.com/474420502/passer v0.0.4 h1:i3g7p6jQG9/Gmxvd+WlnPX67Qv3VWBGdohqCullsfAk=
|
||||
github.com/474420502/passer v0.0.4/go.mod h1:MmnnrF9d51sPkFzdRq2pQtxQKqyjburVM1LjMbOCezE=
|
||||
github.com/474420502/random v0.4.1 h1:HUUyLXRWMijVb7CJoEC16f0aFQOW25Lkr80Mut6PoKU=
|
||||
github.com/474420502/requests v1.41.0 h1:c5OfhVHCvETlwEhODO2OAdPOH7v//kXJkGGUTKOkLOU=
|
||||
github.com/474420502/requests v1.41.0/go.mod h1:2SCVzim0ONFYG09g/GrM7RTeJIC6qTyZfnohsjnG5C8=
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package fusenrender_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"fusenrender"
|
||||
"io"
|
||||
|
@ -37,13 +38,19 @@ func TestWebsocketC(t *testing.T) {
|
|||
fusenrender.StartNode(svc)
|
||||
}
|
||||
|
||||
var addr = "api.fusen.3718.cn:4050"
|
||||
// var addr = "api.fusen.3718.cn:4050"
|
||||
var addr = "localhost:4050"
|
||||
|
||||
func TestWebsocketCient(t *testing.T) {
|
||||
// u := url.URL{Scheme: "ws", Host: addr, Path: "/ws/pop/queue"}
|
||||
// conn, _, err := websocket.DefaultDialer.Dial(u.String(), nil)
|
||||
// log.Println(err)
|
||||
// defer conn.Close()
|
||||
var m any
|
||||
err := json.Unmarshal([]byte(sendjson), &m)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
go func() {
|
||||
C := time.NewTicker(time.Second * 5)
|
||||
|
@ -52,7 +59,7 @@ func TestWebsocketCient(t *testing.T) {
|
|||
Group: "unity3d",
|
||||
|
||||
CreateAt: time.Now(),
|
||||
Data: sendjson,
|
||||
Data: m,
|
||||
}
|
||||
r, err := requests.Post(fmt.Sprintf("http://%s/api/render/queue/push", addr)).SetBodyJson(item).Execute()
|
||||
log.Println(r, err)
|
||||
|
|
Loading…
Reference in New Issue
Block a user