Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Commit

Permalink
DBZ-7920 Use more reliable check on infinity value assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
mfvitale committed Jun 26, 2024
1 parent f70caf1 commit a5ea60c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import java.sql.SQLException;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Base64;
import java.util.List;
Expand All @@ -27,6 +26,7 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ArgumentsSource;
import org.postgresql.PGStatement;
import org.postgresql.geometric.PGpoint;
import org.postgresql.util.PGobject;

Expand Down Expand Up @@ -228,8 +228,8 @@ public void testInsertModeInsertInfinityValues(SinkRecordFactory factory) throws

getSink().assertColumnType(tableAssert, "id", ValueType.NUMBER, (byte) 1);

getSink().assertColumnType(tableAssert, "timestamp_infinity-", Timestamp.class, Timestamp.valueOf(LocalDateTime.of(292269055, 12, 3, 0, 0, 0)));
getSink().assertColumnType(tableAssert, "timestamp_infinity+", Timestamp.class, Timestamp.valueOf(LocalDateTime.of(292278994, 8, 17, 0, 0, 0)));
getSink().assertColumnType(tableAssert, "timestamp_infinity-", Timestamp.class, new Timestamp(PGStatement.DATE_NEGATIVE_INFINITY));
getSink().assertColumnType(tableAssert, "timestamp_infinity+", Timestamp.class, new Timestamp(PGStatement.DATE_POSITIVE_INFINITY));
getSink().assertColumnType(tableAssert, "range_with_infinity", String.class, "[2010-01-01 14:30, +infinity)");

}
Expand Down

0 comments on commit a5ea60c

Please sign in to comment.