Skip to content

Commit

Permalink
conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed Jan 7, 2025
1 parent d1d3378 commit cc95565
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@env-config @backup-consistency
@env-config
Feature: backup consistency
As a user
I want to check my data for inconsistencies
Expand Down
19 changes: 11 additions & 8 deletions tests/ociswrapper/ocis/ocis.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ func Stop() (bool, string) {
log.Println(fmt.Sprintf("Services running before terminating: %s with process and id: %v\n", listservice, pid))
process, err := os.FindProcess(pid)
err = process.Signal(syscall.SIGINT)
if err != nil {
if !strings.HasSuffix(err.Error(), "process already finished") {
log.Fatalln(err)
} else {
return true, "oCIS server is already stopped"
}
}
process.Wait()
if err != nil {
if !strings.HasSuffix(err.Error(), "process already finished") {
log.Fatalln(err)
} else {
return true, "oCIS server is already stopped"
}
}
process.Wait()
delete(runningCommands, "ocis")
}

cmd = nil
Expand All @@ -69,6 +70,8 @@ func Restart(envMap []string) (bool, string) {
}

func IsOcisRunning() bool {
pid, _ := runningCommands["ocis"]
log.Println(fmt.Sprintf("Services process id to terminate: %s\n", pid))
if runningCommands["ocis"] > 0 {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ociswrapper/wrapper/handlers/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func StartOcisHandler(res http.ResponseWriter, req *http.Request) {
sendResponse(res, http.StatusOK, message)
return
}

common.Wg.Wait()
sendResponse(res, http.StatusInternalServerError, message)
}

Expand Down

0 comments on commit cc95565

Please sign in to comment.