Skip to content

Commit 93b559f

Browse files
committed
Removed dependency on spark streaming test from spark flume sink
1 parent 220c2d7 commit 93b559f

File tree

2 files changed

+6
-32
lines changed

2 files changed

+6
-32
lines changed

external/flume-sink/pom.xml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,11 @@
3838
<groupId>org.apache.flume</groupId>
3939
<artifactId>flume-ng-sdk</artifactId>
4040
<version>1.4.0</version>
41-
<exclusions>
42-
<exclusion>
43-
<groupId>io.netty</groupId>
44-
<artifactId>netty</artifactId>
45-
</exclusion>
46-
<exclusion>
47-
<groupId>org.apache.thrift</groupId>
48-
<artifactId>libthrift</artifactId>
49-
</exclusion>
50-
</exclusions>
5141
</dependency>
5242
<dependency>
5343
<groupId>org.apache.flume</groupId>
5444
<artifactId>flume-ng-core</artifactId>
5545
<version>1.4.0</version>
56-
<exclusions>
57-
<exclusion>
58-
<groupId>io.netty</groupId>
59-
<artifactId>netty</artifactId>
60-
</exclusion>
61-
<exclusion>
62-
<groupId>org.apache.thrift</groupId>
63-
<artifactId>libthrift</artifactId>
64-
</exclusion>
65-
</exclusions>
6646
</dependency>
6747
<dependency>
6848
<groupId>org.scala-lang</groupId>
@@ -71,13 +51,7 @@
7151
<dependency>
7252
<groupId>org.scalatest</groupId>
7353
<artifactId>scalatest_${scala.binary.version}</artifactId>
74-
</dependency>
75-
<dependency>
76-
<groupId>org.apache.spark</groupId>
77-
<artifactId>spark-streaming_${scala.binary.version}</artifactId>
78-
<version>${project.version}</version>
79-
<type>test-jar</type>
80-
<scope>test</scope> <!-- Need it only for tests, don't package it -->
54+
<scope>test</scope>
8155
</dependency>
8256
</dependencies>
8357
<build>

external/flume-sink/src/test/scala/org/apache/spark/streaming/flume/sink/SparkSinkSuite.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ import org.apache.avro.ipc.specific.SpecificRequestor
3030
import org.apache.flume.Context
3131
import org.apache.flume.channel.MemoryChannel
3232
import org.apache.flume.event.EventBuilder
33-
import org.apache.spark.streaming.TestSuiteBase
3433
import org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory
34+
import org.scalatest.FunSuite
3535

36-
class SparkSinkSuite extends TestSuiteBase {
36+
class SparkSinkSuite extends FunSuite {
3737
val eventsPerBatch = 1000
3838
val channelCapacity = 5000
3939

40-
test("Success") {
40+
test("Success with ack") {
4141
val (channel, sink) = initializeChannelAndSink()
4242
channel.start()
4343
sink.start()
@@ -57,7 +57,7 @@ class SparkSinkSuite extends TestSuiteBase {
5757
transceiver.close()
5858
}
5959

60-
test("Nack") {
60+
test("Failure with nack") {
6161
val (channel, sink) = initializeChannelAndSink()
6262
channel.start()
6363
sink.start()
@@ -76,7 +76,7 @@ class SparkSinkSuite extends TestSuiteBase {
7676
transceiver.close()
7777
}
7878

79-
test("Timeout") {
79+
test("Failure with timeout") {
8080
val (channel, sink) = initializeChannelAndSink(Map(SparkSinkConfig
8181
.CONF_TRANSACTION_TIMEOUT -> 1.toString))
8282
channel.start()

0 commit comments

Comments
 (0)