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

improving code coverage issue #615 #616

Open
wants to merge 2 commits into
base: 0.4.0
Choose a base branch
from

Conversation

Manan-S0ni
Copy link
Contributor

#615
improving code coverage for zingg/common/core:
/hash to 97% coverage
model and sink both to 100% coverage

@@ -0,0 +1,66 @@
package zingg.common.core.model;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not see the value in creating a model instance here. the static method can be tested directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model class is an abstract class. This was one of the methods to test it, or we can test it through it's implementations. But it is not being used anywhere.
Please guide me if there is any other way to test this class

@@ -0,0 +1,45 @@
package zingg.common.core.sink;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont use the tableoutput class anywhere in the code so can you please remove the test annotations so that this code is not run.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we start using the class, we can utilize this junit, so it makes sense to keep it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted

}

@Test
public void testIdentityLong1() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to testNullValue

@@ -0,0 +1,40 @@
package zingg.hash;

import static org.junit.jupiter.api.Assertions.assertFalse;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a good test

@@ -0,0 +1,45 @@
package zingg.hash;

import static org.junit.jupiter.api.Assertions.assertEquals;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please test for negative values as well

@@ -0,0 +1,71 @@
package zingg.hash;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if you give a range say -10 and -100? What happens with 0,0? see if you can break these functions.

@sonalgoyal
Copy link
Member

@vikasgupta78 can you pease get this to completion?

@vikasgupta78
Copy link
Collaborator

@gnanaprakash-ravi if you have time can you look at this and incorporate review comments as suggested by Sonal

@gnanaprakash-ravi
Copy link
Collaborator

Sure, I will look into it!!

@sonalgoyal
Copy link
Member

I have some ideas on this one, so please talk to me before you start

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.

None yet

4 participants