From 667682533fb1246c4aff07082bf1710851454db7 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 22 Dec 2017 14:56:55 +0300 Subject: jdbc: fix reply creation --- .../src/test/java/com/juick/service/MessageServiceTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-server-jdbc/src/test/java/com') diff --git a/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java b/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java index 6bab2b1c..90feb0ea 100644 --- a/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java +++ b/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java @@ -192,11 +192,12 @@ public class MessageServiceTest extends AbstractJUnit4SpringContextTests { assertThat(emailService.deleteEmail(ugnich_id, "first@localhost"), equalTo(false)); } @Test - public void messageUpdatedTimeShouldMatchLastReplyTime() { + public void messageUpdatedTimeShouldMatchLastReplyTime() throws InterruptedException { int ugnich_id = userService.createUser("hugnich4", "x"); int mid = messagesService.createMessage(ugnich_id, "yo", null, null); Instant ts = jdbcTemplate.queryForObject("SELECT updated FROM messages WHERE message_id=?", Timestamp.class, mid).toInstant(); + Thread.sleep(1000); int rid = messagesService.createReply(mid, 0, ugnich_id, "people", null); Instant rts = jdbcTemplate.queryForObject("SELECT updated FROM messages WHERE message_id=?", Timestamp.class, mid).toInstant(); -- cgit v1.2.3