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

Function stopNodes

sqlchain/mirror/mirror_test.go:164–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

162}
163
164func stopNodes() {
165 var wg sync.WaitGroup
166
167 for _, nodeCmd := range nodeCmds {
168 wg.Add(1)
169 go func(thisCmd *utils.CMD) {
170 defer wg.Done()
171 thisCmd.Cmd.Process.Signal(syscall.SIGTERM)
172 thisCmd.Cmd.Wait()
173 grepRace := exec.Command("/bin/sh", "-c", "grep -a -A 50 'DATA RACE' "+thisCmd.LogPath)
174 out, _ := grepRace.Output()
175 if len(out) > 2 {
176 log.Fatal(string(out))
177 }
178 }(nodeCmd)
179 }
180
181 wg.Wait()
182}
183
184func waitForMirrorComplete(ctx context.Context, dbID string, tick time.Duration, stableDuration time.Duration) (err error) {
185 progressFile := FJ(testWorkingDir, "./mirror/node_mirror/"+dbID+progressFileSuffix)

Callers 1

TestFullProcessFunction · 0.70

Calls 3

FatalFunction · 0.92
WaitMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected