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
[ZEPPELIN-2779] Unit test for job module (zeppelin-web) #2497
[ZEPPELIN-2779] Unit test for job module (zeppelin-web) #2497
Conversation
@sravan-s Please help review this PR. |
if (!clickOk) { return } | ||
|
||
this.sendRunJobRequest() | ||
.catch(response => { |
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.
We don't have any sucess messages?
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.
Job page gets updated by websocket when the requested job is done.
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.
added comment
expect(progress1).toBe('50%') | ||
}) | ||
|
||
it('should get proper job type icons', () => { |
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.
test description (should get proper job type icons
) is duplicated in this one and the next one
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.
Let me fix it.
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.
removed the duplicated test
return acc | ||
}, {}) | ||
|
||
let notes = responseData.jobs |
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.
I scrolled down and saw this is from jobmanager.controller.js
. @1ambda, what do you think? Is it a good idea to change the code here?
IMO, The logic here seems a bit complicated. A lot of side effects are happening inside notes.map
It would be helpful, if we can simplify the logic or have a small one line comment describing what's happening
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.
Let's keep that part :)
3e7a3b3
to
ae3b79a
Compare
@sravan-s I updated the PR, now websocket (un)subscription is handled in this way (2e12c21)
Here are logs for it. |
Looks interesting, let me see :) |
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.
LGTM
Thanks for the review @sravan-s Merge if no more discussion. |
What is this PR for?
Added few test cases for the
job
module underzeppelin-web/
Additionally,
JobModule
jobmanager/*
What type of PR is it?
[Improvement]
What is the Jira issue?
ZEPPELIN-2779
How should this be tested?
zeppelin-web
yarn install
(ornpm install
)yarn run test
(ornpm run test
)The test should pass.
Questions: