MCPcopy Create free account
hub / github.com/baidu/EasyFaaS / TestHandleInvokeDone

Function TestHandleInvokeDone

pkg/controller/rtctrl/runtimeinfo_test.go:110–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

108}
109
110func TestHandleInvokeDone(t *testing.T) {
111 rtParams := &NewRuntimeParameters{
112 RuntimeID: "aa",
113 ConcurrentMode: false,
114 StreamMode: false,
115 WaitRuntimeAliveTimeout: 3,
116 Resource: &api.Resource{},
117 }
118 rt := NewRuntimeInfo(rtParams)
119 req := NewRequestInfo("bb", rt)
120
121 // runnerinfo:=NewRunnerInfo("aaa")
122 rt.requestMap.Store("bb", req)
123 params := &url.Values{}
124 params.Set("maxmemused", "102400")
125 params.Set("success", "true")
126 // runnerinfo.maxMemory=5
127 ret := rt.handleInvokeDone("bb", params, "result 123")
128 if !ret {
129 t.Errorf("handle invoke done failed. %+v", req)
130 }
131}
132
133func TestRuntimeInfo_IsRunnerDefunct(t *testing.T) {
134 rtParams := &NewRuntimeParameters{

Callers

nothing calls this directly

Calls 5

handleInvokeDoneMethod · 0.95
NewRuntimeInfoFunction · 0.85
NewRequestInfoFunction · 0.85
ErrorfMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected