Boris Osipov created FLINK-5077:
-----------------------------------
Summary: testStreamTableSink falls unstable
Key: FLINK-5077
URL:
https://issues.apache.org/jira/browse/FLINK-5077 Project: Flink
Issue Type: Bug
Components: Table API & SQL
Affects Versions: 1.1.4
Reporter: Boris Osipov
I've faced with several fails TableSinkITCase.testStreamTableSink test.
{code}
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 16.938 sec <<< FAILURE! - in org.apache.flink.api.scala.stream.TableSinkITCase
testStreamTableSink(org.apache.flink.api.scala.stream.TableSinkITCase) Time elapsed: 10.534 sec <<< FAILURE!
java.lang.AssertionError: Different number of lines in expected and obtained result. expected:<8> but was:<4>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:645)
at org.apache.flink.test.util.TestBaseUtils.compareResultsByLinesInMemory(TestBaseUtils.java:316)
at org.apache.flink.test.util.TestBaseUtils.compareResultsByLinesInMemory(TestBaseUtils.java:302)
at org.apache.flink.api.scala.stream.TableSinkITCase.testStreamTableSink(TableSinkITCase.scala:61)
{code}
I made small research. I added additional StreamITCase.StringSink
{code}
val results = input.toTable(tEnv, 'a, 'b, 'c)
.where('a < 5 || 'a > 17)
.select('c, 'b)
results.writeToSink(new CsvTableSink(path))
results.toDataStream[Row]
.addSink(new StreamITCase.StringSink)
{code}
and logging. I've ran test several times and I got following resuts in log on fail:
{noformat}
---------- Actual CsvTableSink:
Comment#13,6
Comment#14,6
Comment#15,6
Hello world, how are you?,3
Hello world,2
Hi,1
---------- Stream sink:
Comment#12,6
Comment#13,6
Comment#14,6
Comment#15,6
Hello world, how are you?,3
Hello world,2
Hello,2
Hi,1
---------- Expected result:
Comment#12,6
Comment#13,6
Comment#14,6
Comment#15,6
Hello world, how are you?,3
Hello world,2
Hello,2
Hi,1
{noformat}
Looks like writing to cvs works wrong.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)