Skip to content

Commit

Permalink
[FLINK-23283][table-planner] Fix unstable case GroupWindowITCase#test…
Browse files Browse the repository at this point in the history
…WindowAggregateOnUpsertSource

This closes apache#16408
  • Loading branch information
beyond1920 authored and godfreyhe committed Jul 7, 2021
1 parent fc14857 commit 4e9fa33
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ class GroupWindowITCase(mode: StateBackendMode, useTimestampLtz: Boolean)

@Test
def testWindowAggregateOnUpsertSource(): Unit = {
env.setParallelism(1)
val upsertSourceDataId = registerData(upsertSourceCurrencyData)
tEnv.executeSql(
s"""
Expand Down Expand Up @@ -417,7 +418,8 @@ class GroupWindowITCase(mode: StateBackendMode, useTimestampLtz: Boolean)
val expected = Seq(
"US Dollar,1,102,1970-01-01T00:00,1970-01-01T00:00:05",
"Yen,1,1,1970-01-01T00:00,1970-01-01T00:00:05",
"Euro,1,118,1970-01-01T00:00:15,1970-01-01T00:00:20")
"Euro,1,118,1970-01-01T00:00:15,1970-01-01T00:00:20",
"RMB,1,702,1970-01-01T00:00,1970-01-01T00:00:05")
assertEquals(expected.sorted, sink.getAppendResults.sorted)
}

Expand Down Expand Up @@ -472,6 +474,7 @@ class GroupWindowITCase(mode: StateBackendMode, useTimestampLtz: Boolean)

@Test
def testWindowAggregateOnUpsertSourcePushdownWatermark(): Unit = {
env.setParallelism(1)
val upsertSourceDataId = registerData(upsertSourceCurrencyData)
tEnv.executeSql(
s"""
Expand Down Expand Up @@ -501,7 +504,7 @@ class GroupWindowITCase(mode: StateBackendMode, useTimestampLtz: Boolean)
tEnv.sqlQuery(sql).toAppendStream[Row].addSink(sink)
env.execute()
val expected = Seq(
"1970-01-01T00:00,1970-01-01T00:00:05,102",
"1970-01-01T00:00,1970-01-01T00:00:05,702",
"1970-01-01T00:00:15,1970-01-01T00:00:20,118")
assertEquals(expected.sorted, sink.getAppendResults.sorted)
}
Expand Down

0 comments on commit 4e9fa33

Please sign in to comment.