Skip to content

[Tests] Fix AvroSchemaTest on JDK11#10342

Merged
merlimat merged 2 commits intoapache:masterfrom
lhotari:lh-fix-AvroSchemaTest-on-jdk11
Apr 23, 2021
Merged

[Tests] Fix AvroSchemaTest on JDK11#10342
merlimat merged 2 commits intoapache:masterfrom
lhotari:lh-fix-AvroSchemaTest-on-jdk11

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Apr 23, 2021

Fixes #10122

Motivation

Modifications

  • When testing time fields at millisecond precision, use LocalTime.now().truncatedTo(ChronoUnit.MILLIS) instead of LocalTime.now() .

  • On Java 8, LocalTime.now() has millisecond precision, but on Java 11, there is microsecond precision by default. The change in JDK is https://bugs.openjdk.java.net/browse/JDK-8068730 .

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch

+1

@merlimat merlimat added this to the 2.8.0 milestone Apr 23, 2021
@merlimat merlimat merged commit ff180fc into apache:master Apr 23, 2021
eolivelli pushed a commit to datastax/pulsar that referenced this pull request May 18, 2021
* [Tests] Fix AvroSchemaTest on JDK11

* Fix 2 other similar tests

(cherry picked from commit ff180fc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[jdk11] Avro tests fail on JDK11

4 participants

Comments