Skip to content

Commit

Permalink
[FLINK-34719][streaming] Fix unstable test StreamRecordTest.testWithT…
Browse files Browse the repository at this point in the history
…imestamp above jdk8
  • Loading branch information
Jiabao-Sun committed Mar 18, 2024
1 parent 841f23c commit 8ec5e7e
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ void testWithNoTimestamp() {
.isEqualTo(new StreamRecord<>("test"))
.isEqualTo(record.asRecord());

assertThatThrownBy(record::asWatermark)
.isInstanceOf(ClassCastException.class)
.hasMessageContaining(
"cannot be cast to org.apache.flink.streaming.api.watermark.Watermark");
assertThatThrownBy(record::asWatermark).isInstanceOf(ClassCastException.class);
}

@Test
Expand All @@ -80,10 +77,7 @@ void testWithTimestamp() {
.isNotEqualTo(new StreamRecord<>("foo"))
.isEqualTo(record.asRecord());

assertThatThrownBy(record::asWatermark)
.isInstanceOf(ClassCastException.class)
.hasMessageContaining(
"cannot be cast to org.apache.flink.streaming.api.watermark.Watermark");
assertThatThrownBy(record::asWatermark).isInstanceOf(ClassCastException.class);
}

@Test
Expand Down

0 comments on commit 8ec5e7e

Please sign in to comment.