Skip to content
Snippets Groups Projects
Verified Commit 0a5d4086 authored by Torsten Grote's avatar Torsten Grote
Browse files

Add a test for when one introducee had deleted the other one

parent f94db280
No related branches found
No related tags found
No related merge requests found
...@@ -558,6 +558,58 @@ public class IntroductionIntegrationTest ...@@ -558,6 +558,58 @@ public class IntroductionIntegrationTest
assertFalse(listener2.aborted); assertFalse(listener2.aborted);
} }
@Test
public void testIntroductionToRemovedContact() throws Exception {
// let contact1 and contact2 add each other
addContacts1And2();
assertNotNull(contactId2From1);
assertNotNull(contactId1From2);
// only introducee1 removes introducee2
contactManager1.removeContact(contactId2From1);
// both will accept the introduction
addListeners(true, true);
// make the introduction
long time = clock.currentTimeMillis();
introductionManager0
.makeIntroduction(contact1From0, contact2From0, null, time);
// sync REQUEST messages
sync0To1(1, true);
sync0To2(1, true);
// sync ACCEPT messages back to introducer
sync1To0(1, true);
sync2To0(1, true);
// sync forwarded ACCEPT messages to introducees
sync0To1(1, true);
sync0To2(1, true);
// sync first AUTH and its forward
sync1To0(1, true);
sync0To2(1, true);
// sync second AUTH and its forward as well as the following ACTIVATE
sync2To0(2, true);
sync0To1(2, true);
// sync second ACTIVATE and its forward
sync1To0(1, true);
sync0To2(1, true);
// Introduction only succeeded for introducee1
assertTrue(listener1.succeeded);
assertFalse(listener2.succeeded);
// assert that no session was aborted
assertFalse(listener0.aborted);
assertFalse(listener1.aborted);
assertFalse(listener2.aborted);
}
@Test @Test
public void testIntroducerRemovedCleanup() throws Exception { public void testIntroducerRemovedCleanup() throws Exception {
addListeners(true, true); addListeners(true, true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment