(t *testing.T)
| 108 | } |
| 109 | |
| 110 | func 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 | |
| 133 | func TestRuntimeInfo_IsRunnerDefunct(t *testing.T) { |
| 134 | rtParams := &NewRuntimeParameters{ |
nothing calls this directly
no test coverage detected