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

Bug 1502044 - add buffer size and work_engine test #510

Merged
merged 3 commits into from Oct 31, 2017
Merged

Conversation

jmrodri
Copy link
Contributor

@jmrodri jmrodri commented Oct 20, 2017

during a refactoring of the work engines to support async deprovision
and update we missed the buffer size.

Which issue this PR fixes (This will close that issue when PR gets merged)
fixes 1502044

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 20, 2017
ft.AssertEqual(t, we.bufsz, 10)
}

func TestGetActiveTopics(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 👍

Copy link
Member

@djzager djzager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

ft.AssertEqual(t, "invalid work topic", err.Error(), "invalid error")
}

func TestStartNewJob(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rthallisey I changed that test to actually do the test I was expecting. Should work now.


func (mw mockWorker) Run(token string, buffer chan<- WorkMsg) {
fmt.Println("xxxxxxxxxxxxxxxxxxxxx run called")
mw.called = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code where this gets used is commented out. Does TestStartNewJob need to be uncommented or should we remove the mockWorker struct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll clean that up. I think I wsa in the middle of creating a test that didn't quite work because I needed to mock something else.

during a refactoring of the work engines to support async deprovision
and update we missed the buffer size.
@rthallisey rthallisey merged commit 87b35b6 into master Oct 31, 2017
@jmrodri jmrodri deleted the add-tests branch November 1, 2017 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants