Skip to content

[SPARK-10547] [TEST] Streamline / improve style of Java API tests #8706

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

Closed
wants to merge 2 commits into from

Conversation

srowen
Copy link
Member

@srowen srowen commented Sep 10, 2015

Fix a few Java API test style issues: unused generic types, exceptions, wrong assert argument order

@SparkQA
Copy link

SparkQA commented Sep 10, 2015

Test build #42290 has finished for PR 8706 at commit 3ecaf9f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • static class Converter implements Function<InputStream, Iterable<String>>
    • static class JavaSocketReceiver extends Receiver<String>

new Tuple2<Integer, Integer>(0, 8), new Tuple2<Integer, Integer>(2, 6)));
Assert.assertEquals(partitions.get(1), Arrays.asList(new Tuple2<Integer, Integer>(1, 3),
new Tuple2<Integer, Integer>(3, 8), new Tuple2<Integer, Integer>(3, 8)));
Assert.assertEquals(partitions.get(0), Arrays.asList(new Tuple2<>(0, 5),
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks a little odd since it mixes two different indentation / alignment styles. In these cases I tend to prefer something like this:

Assert.assertEquals(partitions.get(0),
  Arrays.asList(new Tuple2<>(0, 5), new Tuple2<>(0, 8), new Tuple2<>(2, 6)));

@vanzin
Copy link
Contributor

vanzin commented Sep 10, 2015

LGTM, just minor things. Not super sold on the alignment style (seems most of existing code does it differently), but don't really care either way.

@srowen
Copy link
Member Author

srowen commented Sep 11, 2015

All the rest of the comments look good and I've implemented them in the next push. There's no good answer on some of these indentations, but I tried to standardize it more towards line break and deep 4-space indents.

@SparkQA
Copy link

SparkQA commented Sep 11, 2015

Test build #42328 has finished for PR 8706 at commit e6524b8.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Sep 11, 2015

Test build #1742 has finished for PR 8706 at commit e6524b8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@asfgit asfgit closed this in 22730ad Sep 12, 2015
@srowen srowen deleted the SPARK-10547 branch September 13, 2015 09:13
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