Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TestError: Wait for process to terminate #3201

Merged
merged 4 commits into from
Oct 30, 2024
Merged

Conversation

tdmanv
Copy link
Contributor

@tdmanv tdmanv commented Oct 25, 2024

Change Overview

Fixes test failure:

[2024-10-22T00:24:22.205Z] === RUN   Test/KanXSuite/TestError
[2024-10-22T00:24:22.205Z]     kanx_test.go:26: Directory:  /tmp/KanXSuite.TestError1241783243
[2024-10-22T00:24:22.205Z] {"File":"pkg/kanx/kanx_test.go","Function":"github.com/kanisterio/kanister/pkg/kanx.(*KanXSuite).TestError.func1","Line":170,"address":{"Name":"/tmp/KanXSuite.TestError1241783243/kanx.sock","Net":"unix"},"hostname":"59ff3afbb586","level":"info","msg":"Listening on socket","time":"2024-10-22T00:10:41.638214724Z"}
[2024-10-22T00:24:22.205Z] {"File":"pkg/kanx/kanx_grpc.pb.go","Function":"github.com/kanisterio/kanister/pkg/kanx._ProcessService_CreateProcesses_Handler","Line":190,"hostname":"59ff3afbb586","level":"info","msg":"pid:54220  state:PROCESS_STATE_RUNNING","pid":54220,"stderr":"/tmp/KanXSuite.TestError1241783243/kando.3462551783.stderr","stdout":"/tmp/KanXSuite.TestError1241783243/kando.3639450115.stdout","time":"2024-10-22T00:10:41.645434307Z"}
[2024-10-22T00:24:22.205Z] {"File":"runtime/asm_amd64.s","Function":"runtime.goexit","Line":1695,"hostname":"59ff3afbb586","level":"info","msg":"pid:54220  state:PROCESS_STATE_FAILED  exitCode:-1  exitErr:\"signal: killed\"","time":"2024-10-22T00:10:41.680401732Z"}
[2024-10-22T00:24:22.205Z]     kanx_test.go:199: 
[2024-10-22T00:24:22.205Z]         error:
[2024-10-22T00:24:22.205Z]           values are not equal
[2024-10-22T00:24:22.205Z]         got:
[2024-10-22T00:24:22.205Z]           s"PROCESS_STATE_RUNNING"
[2024-10-22T00:24:22.205Z]         want:
[2024-10-22T00:24:22.205Z]           s"PROCESS_STATE_FAILED"
[2024-10-22T00:24:22.205Z]         stack:
[2024-10-22T00:24:22.205Z]           /root/go/pkg/mod/github.com/kanisterio/[email protected]/pkg/kanx/kanx_test.go:199
[2024-10-22T00:24:22.205Z]             c.Assert(ps[0].GetState(), Equals, ProcessState_PROCESS_STATE_FAILED)
[2024-10-22T00:24:22.205Z]           /usr/local/go/src/reflect/value.go:596
[2024-10-22T00:24:22.205Z]             call(frametype, fn, stackArgs, uint32(frametype.Size()), uint32(abid.retOffset), uint32(frameSize), &regArgs)
[2024-10-22T00:24:22.205Z]           /usr/local/go/src/reflect/value.go:380
[2024-10-22T00:24:22.205Z]             return v.call("Call", in)
[2024-10-22T00:24:22.205Z]           /codefresh/volume/k10/go/src/kasten.io/qt-check/suite.go:110
[2024-10-22T00:24:22.205Z]             test.Func.Call([]reflect.Value{reflect.ValueOf(suite), reflect.ValueOf(tc)})

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test
  • 🏗️ Build

Issues

  • fixes #issue-number

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@tdmanv tdmanv force-pushed the tom/fix-kanx-parallel-test branch from a6bfb90 to 9df86e6 Compare October 25, 2024 04:36
pkg/kanx/kanx_test.go Outdated Show resolved Hide resolved
Co-authored-by: Madush Soysa <[email protected]>
@tdmanv tdmanv added the kueue label Oct 28, 2024
Base automatically changed from tom/fix-kanx-parallel-test to master October 28, 2024 16:09
@mergify mergify bot merged commit f958887 into master Oct 30, 2024
22 checks passed
@mergify mergify bot deleted the tom/fix-kanx-error-test branch October 30, 2024 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants