diff options
author | Vitaly Takmazov | 2023-02-01 20:22:05 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-02-01 21:29:08 +0300 |
commit | 57222853c90b0ffc4b800adeeddc289d58ee0a25 (patch) | |
tree | 8d658ed98a48fbe7e078ce7da7a4c17c405ffb7a /src/test | |
parent | 225b85bfd43753a4748dca2bc47b7018294cdfd3 (diff) |
Store timestamp in milliseconds when using SQLite
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 3 | ||||
-rw-r--r-- | src/test/resources/application-sqlite.yml | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 62f50b12..4cbc30b5 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -1779,7 +1779,6 @@ public class ServerTests { @Test @Order(20) - @Disabled("Failed on SQLite") public void discussionsShouldBePageableByTimestamp() throws Exception { String msgText = "Привет, я снова Угнич"; int mid = messagesService.createMessage(ugnich.getUid(), msgText, null, Set.of()); @@ -2622,7 +2621,7 @@ public class ServerTests { "SELECT COUNT(*) FROM auth WHERE user_id=?", Integer.class, ugnich.getUid()); assertThat(count, is(1)); var timestamp = Instant.now().minus(3, ChronoUnit.DAYS).atOffset(ZoneOffset.UTC); - jdbcTemplate.update("UPDATE auth SET ts=? WHERE user_id=?", timestamp, ugnich.getUid()); + jdbcTemplate.update("UPDATE auth SET ts=? WHERE user_id=?", ((EmailServiceImpl)emailService).toDateTime(timestamp), ugnich.getUid()); emailService.cleanupAuthCodes(); count = jdbcTemplate.queryForObject( "SELECT COUNT(*) FROM auth WHERE user_id=?", Integer.class, ugnich.getUid()); diff --git a/src/test/resources/application-sqlite.yml b/src/test/resources/application-sqlite.yml index 6a838f13..6a9c0516 100644 --- a/src/test/resources/application-sqlite.yml +++ b/src/test/resources/application-sqlite.yml @@ -5,7 +5,6 @@ spring: url: jdbc:sqlite:data.db sql: init: - separator: ;; platform: sqlite mode: always |