confluentinc / ksql

The database purpose-built for stream processing applications.
https://ksqldb.io
Other
86 stars 1.04k forks source link

KsMaterializedWindowTableTest fails with JDK 11 #8336

Open martin-g opened 2 years ago

martin-g commented 2 years ago

Describe the bug

Building ksql with Java 11 fails with:

[INFO] Running io.confluent.ksql.execution.streams.materialization.KsqlMaterializationTest
[ERROR] Tests run: 26, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.563 s <<< FAILURE! - in io.confluent.ksql.execution.streams.materialization.KsqlMaterializationTest
[ERROR] io.confluent.ksql.execution.streams.materialization.KsqlMaterializationTest.shouldReturnSelectTransformedFromWindowed  Time elapsed: 0.003 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: is <Optional[Window{start=2021-10-29T09:34:40.270015Z, end=2021-10-29T09:34:40.280016Z}]>
     but: was <Optional[Window{start=2021-10-29T09:34:40.270Z, end=2021-10-29T09:34:40.280Z}]>
    at io.confluent.ksql.execution.streams.materialization.KsqlMaterializationTest.shouldReturnSelectTransformedFromWindowed(KsqlMaterializationTest.java:514)

[INFO] Running io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest
[ERROR] Tests run: 32, Failures: 8, Errors: 0, Skipped: 0, Time elapsed: 1.006 s <<< FAILURE! - in io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest
[ERROR] io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForOpenStartBounds_fetchAll  Time elapsed: 0.914 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: is <false>
     but: was <true>
    at io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForOpenStartBounds_fetchAll(KsMaterializedWindowTableTest.java:678)

[ERROR] io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForClosedStartBounds_fetchAll  Time elapsed: 0.005 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: is <WindowedRow{key=[[0]@1635500080431/1635500140431], value=[ 'col0' ], rowTime=12345, schema=`K0` STRING KEY, `v0` STRING}>
     but: was <WindowedRow{key=[[1]@1635500090431/1635500150431], value=[ 'col1' ], rowTime=45678, schema=`K0` STRING KEY, `v0` STRING}>
    at io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForClosedStartBounds_fetchAll(KsMaterializedWindowTableTest.java:499)

[ERROR] io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForClosedEndBounds_fetchAll  Time elapsed: 0.003 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: is <true>
     but: was <false>
    at io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForClosedEndBounds_fetchAll(KsMaterializedWindowTableTest.java:590)

[ERROR] io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForOpenEndBounds  Time elapsed: 0.005 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: iterable containing [<WindowedRow{key=[[0]@1635500020432/1635500080432], value=[ 'col1' ], rowTime=45678, schema=`K0` STRING KEY, `v0` STRING}>]
     but: Not matched: <WindowedRow{key=[[0]@1635500030431/1635500090431], value=[ 'col2' ], rowTime=987865, schema=`K0` STRING KEY, `v0` STRING}>
    at io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForOpenEndBounds(KsMaterializedWindowTableTest.java:713)

[ERROR] io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForClosedEndBounds  Time elapsed: 0.003 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: iterable containing [<WindowedRow{key=[[0]@1635500020431/1635500080431], value=[ 'col0' ], rowTime=12345, schema=`K0` STRING KEY, `v0` STRING}>, <WindowedRow{key=[[0]@1635500020431/1635500080431], value=[ 'col1' ], rowTime=45678, schema=`K0` STRING KEY, `v0` STRING}>]
     but: No item matched: <WindowedRow{key=[[0]@1635500020431/1635500080431], value=[ 'col0' ], rowTime=12345, schema=`K0` STRING KEY, `v0` STRING}>
    at io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForClosedEndBounds(KsMaterializedWindowTableTest.java:544)

[ERROR] io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForOpenStartBounds  Time elapsed: 0.004 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: iterable containing [<WindowedRow{key=[[0]@1635500080432/1635500140432], value=[ 'col1' ], rowTime=45678, schema=`K0` STRING KEY, `v0` STRING}>]
     but: Not matched: <WindowedRow{key=[[0]@1635500090431/1635500150431], value=[ 'col2' ], rowTime=987865, schema=`K0` STRING KEY, `v0` STRING}>
    at io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForOpenStartBounds(KsMaterializedWindowTableTest.java:633)

[ERROR] io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForClosedStartBounds  Time elapsed: 0.003 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: iterable containing [<WindowedRow{key=[[0]@1635500080431/1635500140431], value=[ 'col0' ], rowTime=12345, schema=`K0` STRING KEY, `v0` STRING}>, <WindowedRow{key=[[0]@1635500090431/1635500150431], value=[ 'col1' ], rowTime=45678, schema=`K0` STRING KEY, `v0` STRING}>]
     but: item 0: was <WindowedRow{key=[[0]@1635500090431/1635500150431], value=[ 'col1' ], rowTime=45678, schema=`K0` STRING KEY, `v0` STRING}>
    at io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForClosedStartBounds(KsMaterializedWindowTableTest.java:457)

[ERROR] io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForOpenEndBounds_fetchAll  Time elapsed: 0.003 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: is <false>
     but: was <true>
    at io.confluent.ksql.execution.streams.materialization.ks.KsMaterializedWindowTableTest.shouldReturnValuesForOpenEndBounds_fetchAll(KsMaterializedWindowTableTest.java:763)

To Reproduce Steps to reproduce the behavior, include:

  1. The version of KSQL: current master branch.
  2. export JAVA_HOME=/path/to/jdk-11.
  3. ./mvnw clean install

Expected behavior

The build passes successfully.

suhas-satish commented 2 years ago

@martin-g , can you try with Java 8?

martin-g commented 2 years ago

It passes with JDK 1.8. I have explained this at https://github.com/confluentinc/ksql/issues/8296#issuecomment-963229024 where the issue has been reported for first time.

On Tue, Nov 23, 2021, 19:30 suhas-satish @.***> wrote:

@martin-g https://github.com/martin-g , can you try with Java 8?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/confluentinc/ksql/issues/8336#issuecomment-976895208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYUQT3BX23QNFBEA5EH4TUNPFTLANCNFSM5HS2XUMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

agavra commented 2 years ago

We currently only support development on JDK8, you may deploy it using JDK11 though if you desire.

martin-g commented 2 years ago

This is sad! I hope my other tickets for JDK 8 + Linux ARM64 to be fixed soon!