-
Notifications
You must be signed in to change notification settings - Fork 5
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
Issue 16 : API for list scope and list stream #20
Issue 16 : API for list scope and list stream #20
Conversation
Signed-off-by: anju_das <[email protected]>
for build test
Signed-off-by: anju_das <[email protected]>
Trigger Build
Signed-off-by: anju_das <[email protected]>
Trigger Build
Signed-off-by: anju_das <[email protected]>
Trigger Build
Signed-off-by: anju_das <[email protected]>
Trigger Build
Signed-off-by: anju_das <[email protected]>
Trigger Build
Signed-off-by: anju_das <[email protected]>
Trigger Build
Signed-off-by: anju_das <[email protected]>
for build test
Signed-off-by: anju_das <[email protected]>
Signed-off-by: anju_das <[email protected]>
Signed-off-by: anju_das <[email protected]>
tests/pravega_client_test.py
Outdated
@@ -57,6 +58,23 @@ def test_tags(self): | |||
tags = stream_manager.get_stream_tags(scope, "testStream1") | |||
self.assertEqual(["t4", "t5"], tags) | |||
|
|||
# test for list_scope api | |||
scope_list = stream_manager.list_scope() | |||
self.assertTrue(len(scope_list) > 0, "The list is empty") |
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.
Instead of scope_list > 0, can we update the assert to length equal to 1.
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.
As we checked offline, it can't be updated with length equal to 1, as it retains all the scope that exist in standalone run too.
So it may or may not be always 1.
Ok(scoped_stream) => { | ||
stream_vector_act.push(scoped_stream.stream.name) | ||
}, | ||
Err(e) => { |
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.
Same here.
It may be useful to have a private method so as to not duplicate so much
Signed-off-by: anju_das <[email protected]>
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.
Signed-off-by: anju_das <[email protected]>
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
Change log description
Add new API to get list of scope and list of stream for python client.
Purpose of the change
Fixes #19
What the code does
The code has two new APi's list_scope and list_stream which when called will return the list of scope and list of stream respectively.
How to verify it
Test cases should pass.