Skip to content

Commit de8ab31

Browse files
tdasliancheng
authored andcommitted
[SPARK-12177][TEST] Removed test to avoid compilation issue in scala 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 <tathagata.das1565@gmail.com> Closes #13992 from tdas/SPARK-12177.
1 parent b30a2dc commit de8ab31

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

external/kafka-0-10/src/test/java/org/apache/spark/streaming/kafka010/JavaConsumerStrategySuite.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public void testConsumerStrategyConstructors() {
5050
JavaConverters.mapAsScalaMapConverter(offsets).asScala();
5151

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

68-
final ConsumerStrategy<String, String> asn0 =
69-
Assign.<String, String>apply(parts, kafkaParams, offsets);
68+
// final ConsumerStrategy<String, String> asn0 = // does not compile in Scala 2.10
69+
// Assign.<String, String>apply(parts, kafkaParams, offsets);
7070
final ConsumerStrategy<String, String> asn1 =
7171
Assign.<String, String>apply(sParts, sKafkaParams, sOffsets);
7272
final ConsumerStrategy<String, String> asn2 =

0 commit comments

Comments
 (0)