-
Notifications
You must be signed in to change notification settings - Fork 828
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(scheduler): Add unit tests for chainer service #5480
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor observation on expected errors/states, might require a small fix. Lgtm otherwise.
g.Expect(psr).To(BeNil()) | ||
} | ||
} else { | ||
pipeline, err := s.pipelineHandler.GetPipeline(test.loadReqV2.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this part of the test fail if test.connection == false
and we don't pass a loadReqV2 ?
If I understand the logic correctly, we should test on whether loadReqV2 exists, and expect "PipelineNotFoundErr" out of GetPipeline(...)
if it doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what I am testing here is that we still have loadReqV2
(ie a new version to roll out) but we do not have a connection to the dataflow engine. In this case the state of the pipeline should be marked with no dataflow engines. I will add a note to explain in the code.
if we do not pass loadReqV2 no events will be sent to dataflow engine in the first place as we do not have a rolling update. which is covered a little bit above this snippet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 3b88833 I have also made the error message check explicit to this specific case.
This PR adds more test coverage for the chainer service: