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

Network-accessing classes need to be testable #6

Open
andrewazores opened this issue Jun 26, 2019 · 2 comments
Open

Network-accessing classes need to be testable #6

andrewazores opened this issue Jun 26, 2019 · 2 comments
Labels
feat New feature or request

Comments

@andrewazores
Copy link
Member

Currently there are several classes which create TCP sockets or HTTP client connections (some examples: RecordingExporter, UploadSavedRecordingsCommand, SocketClientReaderWriter, SocketInteractiveShellExecutor, JMCConnection), and which are partly or entirely missing unit tests since the networking codepaths can not be exercised in unit testing without actually producing network connections. We need some enhanced mocking utilities, or a test harness to intercept connections, in order to properly test and verify these classes.

@andrewazores
Copy link
Member Author

andrewazores commented Jul 22, 2019

JMCConnection has been moved to https://github.com/rh-jmc-team/container-jfr-core

@andrewazores
Copy link
Member Author

This is improved since #23 since fewer classes directly establish connections, but NetworkResolver, RecordingExporter, and SocketClientReaderWriter need testing. Particularly the latter two as they are larger and relatively complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant