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

Add unit tests and sensible coverage #12

Closed
wants to merge 3 commits into from

Conversation

sadikovi
Copy link

This PR adds some unit-tests around parsing different events into JSON and abnormal behaviour of socket or corrupted events.

Tests can be run using sbt test.
Tests with coverage can be run using sbt coverage test coverageReport.
I am not sure if there is a CI for repo, but it would be good to include tests.

Here is the summary for this patch:

[info] Total number of tests run: 17
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 17, failed 0, canceled 0, ignored 0, pending 0
[info] All tests passed.
...
[info] Statement coverage.: 89.62%
[info] Branch coverage....: 80.00%
[info] Coverage reports completed
[info] Coverage is above minimum [89.62% > 80.0%]
[info] All done. Coverage was [89.62%]

Though It is not great coverage and tests, I hope checks will help with migrating to different Spark versions.

@sadikovi
Copy link
Author

@ryan-williams could you have a look at this PR? Thanks!
Would be good to get some feedback on usefulness of unit-tests.

@sadikovi
Copy link
Author

Closes #11.

@sadikovi sadikovi closed this Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant