Skip to content

Commit

Permalink
[SPARK-12177][TEST] Removed test to avoid compilation issue in scala …
Browse files Browse the repository at this point in the history
…2.10

## What changes were proposed in this pull request?

The commented lines failed scala 2.10 build. This is because of change in behavior of case classes between 2.10 and 2.11. In scala 2.10, if companion object of a case class has explicitly defined apply(), then the implicit apply method is not generated. In scala 2.11 it is generated. Hence, the lines compile fine in 2.11 but not in 2.10.

This simply comments the tests to fix broken build. Correct solution is pending.

Author: Tathagata Das <[email protected]>

Closes apache#13992 from tdas/SPARK-12177.
  • Loading branch information
tdas authored and liancheng committed Jun 30, 2016
1 parent b30a2dc commit de8ab31
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public void testConsumerStrategyConstructors() {
JavaConverters.mapAsScalaMapConverter(offsets).asScala();

// make sure constructors can be called from java
final ConsumerStrategy<String, String> sub0 =
Subscribe.<String, String>apply(topics, kafkaParams, offsets);
// final ConsumerStrategy<String, String> sub0 = // does not compile in Scala 2.10
// Subscribe.<String, String>apply(topics, kafkaParams, offsets);
final ConsumerStrategy<String, String> sub1 =
Subscribe.<String, String>apply(sTopics, sKafkaParams, sOffsets);
final ConsumerStrategy<String, String> sub2 =
Expand All @@ -65,8 +65,8 @@ public void testConsumerStrategyConstructors() {
sub1.executorKafkaParams().get("bootstrap.servers"),
sub3.executorKafkaParams().get("bootstrap.servers"));

final ConsumerStrategy<String, String> asn0 =
Assign.<String, String>apply(parts, kafkaParams, offsets);
// final ConsumerStrategy<String, String> asn0 = // does not compile in Scala 2.10
// Assign.<String, String>apply(parts, kafkaParams, offsets);
final ConsumerStrategy<String, String> asn1 =
Assign.<String, String>apply(sParts, sKafkaParams, sOffsets);
final ConsumerStrategy<String, String> asn2 =
Expand Down

0 comments on commit de8ab31

Please sign in to comment.