From 07ac8017afa883f0fb3748a02bc1236882bfd06c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 5 Oct 2018 10:25:18 +0300 Subject: fix 2 tests --- .../src/test/java/com/juick/server/tests/ServerTests.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'juick-server/src/test/java/com') diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java index 3c59fde0..92fc0678 100644 --- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java +++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java @@ -970,6 +970,8 @@ public class ServerTests { serverManager.processMessageEvent(new MessageEvent(this, messagesService.getReply(mid, newfreefdrid), Collections.emptyList())); assertThat(userService.isReplyToBL(ugnich, messagesService.getReply(mid, newfreefdrid)), is(true)); + // TODO: test event listeners correctly + Thread.sleep(2000L); assertThat(lastRead.apply(ugnich, mid), is(newfreefdrid)); privacyQueriesService.blacklistUser(ugnich, freefd); newfreefdrid = messagesService.createReply(mid, 0, freefd, "after ban", null); @@ -1691,12 +1693,8 @@ public class ServerTests { } @Test public void signingSpec() throws IOException { - Key fromKey = new Key(); - fromKey.setId("http://localhost:8080/u/freefd#main-key"); - Person from = new Person(); - from.setPublicKey(fromKey); - Person to = new Person(); - to.setInbox("http://localhost:8080/api/inbox"); + Person from = (Person) signatureManager.getContext(URI.create("http://localhost:8080/u/freefd")).get(); + Person to = (Person) signatureManager.getContext(URI.create("http://localhost:8080/u/ugnich")).get(); Follow follow = new Follow(); follow.setActor("http://localhost:8080/u/freefd"); follow.setObject("http://localhost:8080/u/ugnich"); -- cgit v1.2.3