Calculate the timestamp outside the subscription/transport update

writer - this will allow it to be saved so new connections can work
out whether they should send updates.
This commit is contained in:
akwizgran
2011-08-14 13:36:21 +02:00
parent 4497774311
commit 2c13e35dc4
9 changed files with 31 additions and 27 deletions

View File

@@ -779,8 +779,9 @@ public abstract class DatabaseComponentTest extends TestCase {
oneOf(database).getVisibleSubscriptions(txn, contactId);
will(returnValue(Collections.singletonMap(group, 0L)));
// Add the subscriptions to the writer
oneOf(subscriptionWriter).writeSubscriptions(
Collections.singletonMap(group, 0L));
oneOf(subscriptionWriter).writeSubscriptionUpdate(
with(Collections.singletonMap(group, 0L)),
with(any(long.class)));
}});
DatabaseComponent db = createDatabaseComponent(database, cleaner);
@@ -811,7 +812,8 @@ public abstract class DatabaseComponentTest extends TestCase {
oneOf(database).getTransports(txn);
will(returnValue(transports));
// Add the properties to the writer
oneOf(transportWriter).writeTransports(transports);
oneOf(transportWriter).writeTransportUpdate(with(transports),
with(any(long.class)));
}});
DatabaseComponent db = createDatabaseComponent(database, cleaner);