diff options
author | Vitaly Takmazov | 2022-12-14 20:00:38 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-14 20:10:15 +0300 |
commit | 708c1fea2e47997698c493e13cd16c200d60d276 (patch) | |
tree | ca276ea2526c9ecf5f029b921ad0843659982b69 /src/test | |
parent | 560d89cb0285435f0e7c640b3fb67ab1197df808 (diff) |
Fix the integer overflow issue
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 3a7697e1..d964185d 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -2743,4 +2743,13 @@ public class ServerTests { mockMvc.perform(get(htmlUri).accept(Context.LD_JSON_MEDIA_TYPE)).andExpect(status().is3xxRedirection()) .andExpect(redirectedUrl(ldUri)); } + @Test + @Transactional + public void unsignedOverlowTest() throws Exception { + var result = commandsManager.processCommand(ugnich, "test", emptyUri); + var mid = result.getNewMessage().get().getMid(); + jdbcTemplate.update("UPDATE subscr_messages SET last_read_rid=10 WHERE message_id=?", mid); + assertThat(messagesService.getMessages(ugnich, List.of(mid)).size(), is(1)); + assertThat(messagesService.getMessages(ugnich, List.of(mid)).get(0).isUnread(), is(false)); + } } |