mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 08:16:47 +00:00
Use Mono.share() for mrmMessageMono
This commit is contained in:
1 parent
513f19370a
commit
ab2e6bb9a3
2 files changed
+4
-3
No files matched your search
@@ -444,7 +444,7 @@ public class MessagesCache extends RedisClusterPubSubAdapter<String, String> imp
|
||||
conn -> conn.reactive().hmget(key, "data".getBytes(StandardCharsets.UTF_8), sharedMrmViewKey)
|
||||
.collectList()
|
||||
.publishOn(messageDeliveryScheduler)))
|
||||
.handle((mrmDataAndView, sink) -> {
|
||||
.<MessageProtos.Envelope>handle((mrmDataAndView, sink) -> {
|
||||
try {
|
||||
assert mrmDataAndView.size() == 2;
|
||||
|
||||
@@ -461,7 +461,8 @@ public class MessagesCache extends RedisClusterPubSubAdapter<String, String> imp
|
||||
} catch (Exception e) {
|
||||
sink.error(e);
|
||||
}
|
||||
});
|
||||
})
|
||||
.share();
|
||||
|
||||
experiment.compareMonoResult(mrmMessage.toBuilder().clearSharedMrmKey().build(), mrmMessageMono);
|
||||
|
||||
|
||||
+1
-1
@@ -575,7 +575,7 @@ class MessagesCacheTest {
|
||||
if (sharedMrmKeyPresent) {
|
||||
sharedMrmDataKey = messagesCache.insertSharedMultiRecipientMessagePayload(mrm);
|
||||
} else {
|
||||
sharedMrmDataKey = new byte[]{1};
|
||||
sharedMrmDataKey = "{1}".getBytes(StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
final UUID guid = UUID.randomUUID();
|
||||
|
||||
Reference in new issue
Block a user