Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/5564#discussion_r170291034
--- Diff:
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/descriptors/RowtimeTest.scala
---
@@ -18,48 +18,67 @@
package org.apache.flink.table.descriptors
+import java.util
+
import org.apache.flink.streaming.api.watermark.Watermark
import org.apache.flink.table.api.ValidationException
import org.apache.flink.table.descriptors.RowtimeTest.CustomAssigner
import
org.apache.flink.table.sources.wmstrategies.PunctuatedWatermarkAssigner
import org.apache.flink.types.Row
import org.junit.Test
-class RowtimeTest extends DescriptorTestBase {
+import scala.collection.JavaConverters._
- @Test
- def testRowtime(): Unit = {
- val desc = Rowtime()
- .timestampsFromField("otherField")
- .watermarksPeriodicBounding(1000L)
- val expected = Seq(
- "rowtime.0.version" -> "1",
- "rowtime.0.timestamps.type" -> "from-field",
- "rowtime.0.timestamps.from" -> "otherField",
- "rowtime.0.watermarks.type" -> "periodic-bounding",
- "rowtime.0.watermarks.delay" -> "1000"
- )
- verifyProperties(desc, expected)
- }
+class RowtimeTest extends DescriptorTestBase {
@Test(expected = classOf[ValidationException])
def testInvalidWatermarkType(): Unit = {
- verifyInvalidProperty("rowtime.0.watermarks.type", "xxx")
+ verifyInvalidProperty(descriptors().get(0), "rowtime.watermarks.type",
"xxx")
}
@Test(expected = classOf[ValidationException])
def testMissingWatermarkClass(): Unit = {
- verifyMissingProperty("rowtime.0.watermarks.class")
+ verifyMissingProperty(descriptors().get(1), "rowtime.watermarks.class")
--- End diff --
use constant
---