Use strings rather than hashes to identify transports. Dev task #64.

This commit is contained in:
akwizgran
2014-01-24 10:39:34 +00:00
parent 468db2a97b
commit 822392f9e7
26 changed files with 115 additions and 172 deletions

View File

@@ -98,9 +98,9 @@ public abstract class DatabaseComponentTest extends BriarTestCase {
subject, timestamp, raw);
message1 = new TestMessage(messageId1, messageId, group, null,
contentType, subject, timestamp, raw);
transportId = new TransportId(TestUtils.getRandomId());
transportId = new TransportId("id");
transportProperties = new TransportProperties(Collections.singletonMap(
"foo", "bar"));
"bar", "baz"));
contactId = new ContactId(234);
contact = new Contact(contactId, author, localAuthorId);
endpoint = new Endpoint(contactId, transportId, 123, true);

View File

@@ -85,7 +85,7 @@ public class H2DatabaseTest extends BriarTestCase {
random.nextBytes(raw);
message = new TestMessage(messageId, null, group, author, contentType,
subject, timestamp, raw);
transportId = new TransportId(TestUtils.getRandomId());
transportId = new TransportId("id");
contactId = new ContactId(1);
}
@@ -1320,8 +1320,8 @@ public class H2DatabaseTest extends BriarTestCase {
long epoch1 = 123, latency1 = 234;
long epoch2 = 345, latency2 = 456;
boolean alice1 = true, alice2 = false;
TransportId transportId1 = new TransportId(TestUtils.getRandomId());
TransportId transportId2 = new TransportId(TestUtils.getRandomId());
TransportId transportId1 = new TransportId("bar");
TransportId transportId2 = new TransportId("baz");
Endpoint ep1 = new Endpoint(contactId, transportId1, epoch1, alice1);
Endpoint ep2 = new Endpoint(contactId, transportId2, epoch2, alice2);