mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 05:43:09 -06:00
Also test reserialisation
This commit is contained in:
parent
2bde8b59a4
commit
e9ef552ca0
|
|
@ -129,7 +129,7 @@ func (t *StreamingToken) String() string {
|
||||||
t.syncToken.String(),
|
t.syncToken.String(),
|
||||||
}
|
}
|
||||||
for name, lp := range t.logs {
|
for name, lp := range t.logs {
|
||||||
logStr := fmt.Sprintf("%s%d-%d", name, lp.Partition, lp.Offset)
|
logStr := fmt.Sprintf("%s-%d-%d", name, lp.Partition, lp.Offset)
|
||||||
logStrings = append(logStrings, logStr)
|
logStrings = append(logStrings, logStr)
|
||||||
}
|
}
|
||||||
// E.g s11_22_33|dl0-134|ab1-441
|
// E.g s11_22_33|dl0-134|ab1-441
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@ func TestNewSyncTokenWithLogs(t *testing.T) {
|
||||||
if !reflect.DeepEqual(got, *want) {
|
if !reflect.DeepEqual(got, *want) {
|
||||||
t.Errorf("%s mismatch: got %v want %v", tok, got, want)
|
t.Errorf("%s mismatch: got %v want %v", tok, got, want)
|
||||||
}
|
}
|
||||||
|
if got.String() != tok {
|
||||||
|
t.Errorf("%s reserialisation mismatch: got %s want %s", tok, got.String(), tok)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue