Skip to content

Conversation

@TheRealHaui
Copy link
Contributor

Added new Unit Tests to increase code coverage.

@TheRealHaui
Copy link
Contributor Author

@jerryjiangabc
To you request changes in this pull request?

Copy link
Contributor

@guimingTang guimingTang left a comment

Choose a reason for hiding this comment

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

Thanks for contributing to the test cases! AndFilterTest already exists under com.twitter.graphjet.algorithms.filter. Could you merge the new test cases with the existing tests?

@TheRealHaui
Copy link
Contributor Author

@guimingTang
Done.

}

@Test
public void testFilterResultReturningFalseOne() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is almost equivalent to testNoFilter() where the socialProof array and resultNode values are changed. Can we reuse the existing setup and merge them under the same test function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

}

@Test
public void testFilterResultReturningFalseTwo() {
Copy link
Contributor

Choose a reason for hiding this comment

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

s/testFilterResultReturningFalseTwo()/testWithRecentTweetFilter()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed method.
I consider your comment requesting to change the name of the method.


@Test
public void testFilterResultReturningFalseTwo() {
List<ResultFilter> linkedList = new LinkedList<ResultFilter>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Variables should generally be named by its designed purpose, i.e. in this case the var linkedList should be called something like "filters"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

StatsReceiver statsReceiver = new NullStatsReceiver();
RecentTweetFilter recentTweetFilter = new RecentTweetFilter(2147483639L, statsReceiver);
linkedList.add(recentTweetFilter);
ANDFilters aNDFilters = new ANDFilters(linkedList, statsReceiver);
Copy link
Contributor

Choose a reason for hiding this comment

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

s/aNDFilters/andFilters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

RecentTweetFilter recentTweetFilter = new RecentTweetFilter(2147483639L, statsReceiver);
linkedList.add(recentTweetFilter);
ANDFilters aNDFilters = new ANDFilters(linkedList, statsReceiver);
SmallArrayBasedLongToDoubleMap[] smallArrayBasedLongToDoubleMapArray = new SmallArrayBasedLongToDoubleMap[5];
Copy link
Contributor

Choose a reason for hiding this comment

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

s/smallArrayBasedLongToDoubleMapArray/socialProofs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

* @see SalsaRequestBuilder
**/
public class SalsaRequestBuilderTest {
@Test
Copy link
Contributor

Choose a reason for hiding this comment

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

The GraphJet codebase adopts a 2-space convention. Could you trim the spacing in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@TheRealHaui
Copy link
Contributor Author

@guimingTang
Incorporated requested changes.

@TheRealHaui
Copy link
Contributor Author

Obviously, accidentally closed this pull request after approving but before merging.
Reopen it therefore.

@TheRealHaui TheRealHaui reopened this Nov 27, 2017
@CLAassistant
Copy link

CLAassistant commented Jul 18, 2019

CLA assistant check
All committers have signed the CLA.

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.

3 participants