mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Wait for transport properties as well as client versions.
This commit is contained in:
@@ -94,11 +94,12 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
|
|||||||
bob.getEventBus().addListener(listener);
|
bob.getEventBus().addListener(listener);
|
||||||
// Alice sends a private message to Bob
|
// Alice sends a private message to Bob
|
||||||
sendMessage(alice, bobId);
|
sendMessage(alice, bobId);
|
||||||
// Send three simplex streams to exchange client versions and the
|
// Sync Alice's client versions and transport properties
|
||||||
// private message
|
read(bob, aliceId, write(alice, bobId), 2);
|
||||||
read(bob, aliceId, write(alice, bobId), 1); // Alice's client versions
|
// Sync Bob's client versions and transport properties
|
||||||
read(alice, bobId, write(bob, aliceId), 1); // Bob's client versions
|
read(alice, bobId, write(bob, aliceId), 2);
|
||||||
read(bob, aliceId, write(alice, bobId), 1); // Alice's private message
|
// Sync the private message
|
||||||
|
read(bob, aliceId, write(alice, bobId), 1);
|
||||||
// Bob should have received the private message
|
// Bob should have received the private message
|
||||||
assertTrue(listener.messageAdded);
|
assertTrue(listener.messageAdded);
|
||||||
}
|
}
|
||||||
@@ -131,8 +132,7 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void read(SimplexMessagingIntegrationTestComponent device,
|
private void read(SimplexMessagingIntegrationTestComponent device,
|
||||||
ContactId contactId, byte[] stream,
|
ContactId contactId, byte[] stream, int deliveries)
|
||||||
@SuppressWarnings("SameParameterValue") int deliveries)
|
|
||||||
throws Exception {
|
throws Exception {
|
||||||
// Listen for message deliveries
|
// Listen for message deliveries
|
||||||
MessageDeliveryListener listener =
|
MessageDeliveryListener listener =
|
||||||
|
|||||||
Reference in New Issue
Block a user