MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / stopNodes

Function stopNodes

sqlchain/observer/observation_test.go:187–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185}
186
187func stopNodes() {
188 var wg sync.WaitGroup
189
190 for _, nodeCmd := range nodeCmds {
191 wg.Add(1)
192 go func(thisCmd *utils.CMD) {
193 defer wg.Done()
194 thisCmd.Cmd.Process.Signal(syscall.SIGTERM)
195 thisCmd.Cmd.Wait()
196 grepRace := exec.Command("/bin/sh", "-c", "grep -a -A 50 'DATA RACE' "+thisCmd.LogPath)
197 out, _ := grepRace.Output()
198 if len(out) > 2 {
199 log.Fatal(string(out))
200 }
201 }(nodeCmd)
202 }
203
204 wg.Wait()
205}
206
207func getJSON(pattern string, args ...interface{}) (result *jsonq.JsonQuery, err error) {
208 url := "http://localhost:4663/" + apiProxyPrefix + "/" + fmt.Sprintf(pattern, args...)

Callers 1

TestFullProcessFunction · 0.70

Calls 3

FatalFunction · 0.92
WaitMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected