Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Dehm
briar
Commits
0a5d4086
Verified
Commit
0a5d4086
authored
7 years ago
by
Torsten Grote
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
briar-core/src/test/java/org/briarproject/briar/introduction/IntroductionIntegrationTest.java
+52
-0
52 additions, 0 deletions
...oject/briar/introduction/IntroductionIntegrationTest.java
with
52 additions
and
0 deletions
briar-core/src/test/java/org/briarproject/briar/introduction/IntroductionIntegrationTest.java
+
52
−
0
View file @
0a5d4086
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment