fix: sync correct collectible username projection
This commit is contained in:
parent
8356989e01
commit
9041abd3d3
42 changed files with 601 additions and 758 deletions
|
|
@ -2,7 +2,6 @@ package rpc
|
|||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
@ -1300,10 +1299,7 @@ func TestBuildOutboxStoryUpdatesHydratesCompanionPeersWithStoriesMaxID(t *testin
|
|||
ownerUser := findUserClass(updates[0].Users, owner.ID)
|
||||
assertUserStoryMaxID(t, ownerUser, 13)
|
||||
projectedOwner := ownerUser.(*tg.User)
|
||||
vector, set := projectedOwner.GetUsernames()
|
||||
if !set || !reflect.DeepEqual(usernameStrings(vector), []string{"story_owner", "story_collectible"}) {
|
||||
t.Fatalf("story owner usernames = %v (set %v), want complete vector", usernameStrings(vector), set)
|
||||
}
|
||||
assertVectorOnlyUsernames(t, "story owner", projectedOwner, []string{"story_owner", "story_collectible"})
|
||||
if registry.peerCalls != 1 || registry.batchCalls != 0 {
|
||||
t.Fatalf("username registry reads = peer %d / batch %d, want one claim-wide read", registry.peerCalls, registry.batchCalls)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue