【发布时间】:2018-03-07 15:36:45
【问题描述】:
根据
https://ci.apache.org/projects/flink/flink-docs-release-1.4/dev/stream/testing.html 用于 Scala
集成测试部分
测试尝试看起来几乎相同
import java.util
import java.lang.Long
import com.google.common.collect.Lists
import org.apache.flink.streaming.api.functions.sink.SinkFunction
import org.apache.flink.streaming.api.scala.{DataStream, StreamExecutionEnvironment}
import org.apache.flink.streaming.util.StreamingMultipleProgramsTestBase
import org.apache.flink.api.common.typeinfo.TypeInformation
import org.junit.Test
import org.junit.Assert.assertEquals
class HotelSearchIntegrationTest extends StreamingMultipleProgramsTestBase{
@Test
def testMatching(): Unit = {
val env = StreamExecutionEnvironment.getExecutionEnvironment
env.setParallelism(1)
env
.fromElements(1L)
.map( v => v).addSink( v => println(s"v"))
// execute
env.execute()
assertEquals(1L, 1L)
}
}
sbt test
没有给我带来任何执行测试
[info] Compiling 1 Scala source to .../target/scala-2.11/test-classes...
[info] Run completed in 10 milliseconds.
[info] Total number of tests run: 0
[info] Suites: completed 0, aborted 0
[info] Tests: succeeded 0, failed 0, canceled 0, ignored 0, pending 0
[info] No tests were executed.
[success] Total time: 1 s, completed Mar 7, 2018 4:30:45 PM
我只是不明白这里出了什么问题。
感谢任何提示。
【问题讨论】:
标签: apache-flink flink-streaming