-
Couldn't load subscription status.
- Fork 0
Implement connect() and disconnect() #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
Implement connect() and disconnect() #5
Conversation
Test Results10 files ± 0 10 suites ±0 5s ⏱️ ±0s Results for commit 5f873b7. ± Comparison against base commit 13e7f3c. This pull request removes 3 and adds 8 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
Take a look at pin map client code. A couple of notable things:
|
Note that channel is really for unit testing. |
…ided_interface and service_class to Panel.
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.
Approved with suggestions
What does this Pull Request accomplish?
This PR implements
Panel.connect()andPanel.disconnect(), allowing the Panel to connect to a PythonPanelServer. The port to connect to is determined by the specific subclass of Panel, and how it overrides_resolve_service_address().The
StreamlitPaneluses theDiscoveryClientto find the port for the "ni.pythonpanel.v1.PythonPanelService".I also added a
PortPanelfor testing. This allows test code to connect to a server at a specified port. This is used in conjunction with a newFakePythonPanelServicerthat trivially implements the PythonPanelServer interface.Why should this Pull Request be merged?
Implements AB#3095680 - Implement connect() and disconnect()
What testing has been done?
I added tests for the new
FakePythonPanelServicer, just to ensure it accepts requests and returns responses.Also, the preexisting tests for Panel now use the new
PortPanel(with a pytest fixture) to connect to theFakePythonPanelServicer.