File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
java/org/apache/spark/streaming/kafka
scala/org/apache/spark/streaming/kafka Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 36
36
import org .apache .spark .streaming .api .java .JavaStreamingContext ;
37
37
38
38
import org .junit .Test ;
39
- import org .junit .Ignore ;
40
39
import org .junit .After ;
41
40
import org .junit .Before ;
42
41
@@ -48,7 +47,7 @@ public class JavaKafkaStreamSuite extends LocalJavaStreamingContext implements S
48
47
public void setUp () {
49
48
testSuite .beforeFunction ();
50
49
System .clearProperty ("spark.driver.port" );
51
- System .setProperty ("spark.streaming.clock" , "org.apache.spark.streaming.util.SystemClock" );
50
+ // System.setProperty("spark.streaming.clock", "org.apache.spark.streaming.util.SystemClock");
52
51
ssc = new JavaStreamingContext ("local[2]" , "test" , new Duration (1000 ));
53
52
}
54
53
@@ -61,7 +60,7 @@ public void tearDown() {
61
60
testSuite .afterFunction ();
62
61
}
63
62
64
- @ Ignore @ Test
63
+ @ Test
65
64
public void testKafkaStream () {
66
65
String topic = "topic1" ;
67
66
HashMap <String , Integer > topics = new HashMap <String , Integer >();
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ class KafkaStreamSuite extends TestSuiteBase {
48
48
val brokerConf = new KafkaConfig (brokerProps)
49
49
var server : KafkaServer = _
50
50
51
+ override def useManualClock = false
52
+
51
53
override def beforeFunction () {
52
54
// Zookeeper server startup
53
55
zookeeper = new EmbeddedZookeeper (zkConnect)
@@ -75,7 +77,7 @@ class KafkaStreamSuite extends TestSuiteBase {
75
77
super .afterFunction()
76
78
}
77
79
78
- ignore (" kafka input stream" ) {
80
+ test (" kafka input stream" ) {
79
81
val ssc = new StreamingContext (master, framework, batchDuration)
80
82
val topic = " topic1"
81
83
val sent = Map (" a" -> 5 , " b" -> 3 , " c" -> 10 )
You can’t perform that action at this time.
0 commit comments