kanisterio / kanister

An extensible framework for application-level data management on Kubernetes
https://kanister.io
Apache License 2.0
764 stars 155 forks source link

Fix TestParallelStdout: Wait for process to terminate #3200

Closed tdmanv closed 4 weeks ago

tdmanv commented 1 month ago

Change Overview

Should fix error:

[2024-10-25T00:23:22.786Z] === RUN   Test/KanXSuite/TestParallelStdout
...
[2024-10-25T00:23:22.811Z]     kanx_test.go:264: 
[2024-10-25T00:23:22.811Z]         error:
[2024-10-25T00:23:22.811Z]           values are not equal
[2024-10-25T00:23:22.811Z]         got:
[2024-10-25T00:23:22.811Z]           s"PROCESS_STATE_RUNNING"
[2024-10-25T00:23:22.811Z]         want:
[2024-10-25T00:23:22.811Z]           s"PROCESS_STATE_FAILED"
[2024-10-25T00:23:22.811Z]         stack:
[2024-10-25T00:23:22.811Z]           /root/go/pkg/mod/github.com/kanisterio/kanister@v0.0.0-20241023201758-793523b6a886/pkg/kanx/kanx_test.go:264
[2024-10-25T00:23:22.811Z]             c.Assert(ps[0].GetState(), Equals, ProcessState_PROCESS_STATE_FAILED)
[2024-10-25T00:23:22.811Z]           /usr/local/go/src/reflect/value.go:596
[2024-10-25T00:23:22.811Z]             call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs)
[2024-10-25T00:23:22.811Z]           /usr/local/go/src/reflect/value.go:380
[2024-10-25T00:23:22.811Z]             return v.call("Call", in)
[2024-10-25T00:23:22.811Z]           /codefresh/volume/k10/go/src/kasten.io/qt-check/suite.go:110
[2024-10-25T00:23:22.811Z]             test.Func.Call([]reflect.Value{reflect.ValueOf(suite), reflect.ValueOf(tc)})

Pull request type

Please check the type of change your PR introduces:

Issues

Test Plan