Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dheyman committed Mar 21, 2024
1 parent cbac5c0 commit bbe6ff8
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
public class SqlInputTimestampUtilTest {
private static final SFLogger LOGGER = SFLoggerFactory.getLogger(SqlInputTimestampUtilTest.class);


private static final String TIMESTAMP_IN_FORMAT_1 = "2021-12-22 09:43:44.000";
private static final String TIMESTAMP_IN_FORMAT_2 = "Wed, 22 Dec 2021 09:43:44";
private static final String TIMESTAMP_IN_FORMAT_1 = "2021-12-22 09:43:44.000 +0100";
private static final String TIMESTAMP_IN_FORMAT_2 = "Wed, 22 Dec 2021 09:43:44 +0100";
private static final Map<String, Object> CONNECTION_PARAMS = new HashMap<>();
private static final Timestamp EXPECTED_TIMESTAMP =
Timestamp.valueOf(LocalDateTime.of(2021, 12, 22, 9, 43, 44));
Expand All @@ -29,8 +28,8 @@ public class SqlInputTimestampUtilTest {

@BeforeClass
public static void setup() {
CONNECTION_PARAMS.put("TIMESTAMP_OUTPUT_FORMAT", "YYYY-MM-DD HH24:MI:SS.FF3");
CONNECTION_PARAMS.put("TIMESTAMP_TZ_OUTPUT_FORMAT", "DY, DD MON YYYY HH24:MI:SS");
CONNECTION_PARAMS.put("TIMESTAMP_OUTPUT_FORMAT", "YYYY-MM-DD HH24:MI:SS.FF3 TZHTZM");
CONNECTION_PARAMS.put("TIMESTAMP_TZ_OUTPUT_FORMAT", "DY, DD MON YYYY HH24:MI:SS TZHTZM");
mockSession = Mockito.mock(SFBaseSession.class);
Mockito.when(mockSession.getCommonParameters()).thenReturn(CONNECTION_PARAMS);
}
Expand Down Expand Up @@ -59,6 +58,6 @@ public void shouldGetTimestampForDifferentType() {

private Timestamp getFromType(int type, String value, TimeZone explicitTimezone) {
return SqlInputTimestampUtil.getTimestampFromType(
type, value, mockSession, TimeZone.getTimeZone("CET"), explicitTimezone);
type, value, mockSession, TimeZone.getTimeZone("GMT"), explicitTimezone);
}
}

0 comments on commit bbe6ff8

Please sign in to comment.